How to do a flip animation between more than two UIViews?

后端 未结 4 598
闹比i
闹比i 2020-12-29 17:26

I have animation code in a class that extends the UIView:

// Start Animation Block
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimati         


        
4条回答
  •  囚心锁ツ
    2020-12-29 17:59

    If you have pointers to the views you're trying to switch between, just call -removeFromSuperview on the "from" view and -addSubview:(the "to" view) on the superview. The transition doesn't rely on any particular method call; more or less any form of the "swap two views" approach will be animated properly.

提交回复
热议问题