In fact, you can still pause the UIView animation based on the answer to a question related to Vladimir, since it pauses my CABasicAnimations as well as my UIView animations after I completed all my animations as CABasicaAnimations and then added some UIView animations. which, I thought, would not be suspended, but they also did not work. This is a relevant link .
I wanted to pause my entire view, so I went through self.view.layer as the layer to pause. But for those who don't know about CALayer , go to the view.layer you want to pause. Each UIView has a CALayer , so just go to the topmost view.layer that suits you. In the case of Thomas, based on your own answer, it seems like you want to go to self.containerView.layer to pause.
The reason for this is that UIView animation is just a layer on top of Core Animation. At least that's my understanding.
I hope this helps future people wonder how to pause animation.
source share