Since iOS 13 [UIView beginAnimation] and [UIView commitAnimations] are deprecated as you can see below.
![](https://7redbits.com/wp-content/uploads/2019/11/Screenshot-2019-11-05-at-09.42.54-1024x191.jpg)
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.
![](https://7redbits.com/wp-content/uploads/2019/11/Screenshot-2019-11-05-at-09.44.15.jpg)