UIView TransitionFromView example?

I would like to use the UIView transitionFromView method to animate the view and catch the event when it is completed. Can someone post an example?

Thanks!

F.

+4
source share
1 answer
-(IBAction) anAction:(id) sender { // assume view1 and view2 are some subviews of self.view // view1 will be replaced with view2 in the view hierarchy [UIView transitionFromView:view1 toView:view2 duration:0.5 options:UIViewAnimationOptionTransitionFlipFromLeft completion:^(BOOL finished){ /* do something on animation completion */ }]; } } 
+17
source

Source: https://habr.com/ru/post/1333889/


All Articles