iOS 13 block based animations in Objective-C

Since iOS 13 [UIView beginAnimation] and [UIView commitAnimations] are deprecated as you can see below.

Xcode yells at you that you must use the block-based animation API instead. You should use [UIView animateWithDuration] instead.

This can be achieved like this.