I saw a lot of people asking about how to click / pop UINavigationControllerusing other animations besides the standard animation, for example flipor curl.
The problem is that either the question / answer was relatively old, which means that it has things like [UIView beginAnimations:](example here ) or they use two very different approaches.
First, use the UIView selector transitionFromView:toView:duration:options:completion:before clicking on the controller (with the animation flag set to NO), for example:
UIViewController *ctrl = [[UIViewController alloc] init];
[UIView transitionFromView:self.view
toView:ctrl.view
duration:1
options:UIViewAnimationOptionTransitionFlipFromTop
completion:nil];
[self.navigationController pushViewController:ctrl animated:NO];
Another is to use explicitly CoreAnimationwith the CATransactionfollowing:
CATransition* transition = [CATransition animation];
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
transition.duration = 1.0f;
transition.type = @"flip";
transition.subtype = @"fromTop";
[self.navigationController.view.layer removeAllAnimations];
[self.navigationController.view.layer addAnimation:transition forKey:kCATransition];
UIViewController *ctrl = [[UIViewController alloc] init];
[self.navigationController pushViewController:ctrl animated:NO];
There are pros and cons for both approaches.
, , "suckEffect", "cube" .
, . (.. CATransition), App Store ( , , , ), , , "cameraIris", "rippleEffect" ..
, QuartzCore CoreAnimation, UINavigationController fancier? , UIKit?
, , "" "", (kCATransitionFade, kCATransitionMoveIn ..), , ?
, , , ?