Add coreGraphics. framework in CATransitionAnimation. import -- # import <QuartzCore/QuartzCore. h> @ interface CATransitionAnimation: UIViewController // use CATransition to override the push method of viewControlller -- 1-(void) customPushViewControllerWithAnimation :( UIViewController *) viewController; In CATransitionAnimation. m file write method // use CATransition to override viewControlller's push method --- (void) customPushViewControllerWithAnimation :( UIViewController *) viewController {CATransition * transition = [CATransition animation]; transition. duration = 0.3f; // control the jump speed -- transition. timingFunction = [CAMediaTimingFunction functionWithName: kCAMediaTimingFunctionEaseInEaseOut]; // use the fade-out method transition. type = kCATransitionPush; // use the push method transition. removedOnCompletion = YES; transition. subtype = kCATransitionFromRight; // start to push [viewController. view. layer addAnimation: transition forKey: @ "transition"]; [self presentViewController: viewController animated: NO completion: ^ {}];} inherit this class in the file -- @ interface ViewController: CATransitionAnimation and then reference this method directly in the file --
When a page jumps to this page: nextPAGEViewcontroller * newpage = [[nextPAGEViewcontroller alloc] init]; UINavigationController * NAC = [[UINavigationController alloc] initWithRootViewController: newpage]; NAC. navigationBarHidden = YES; call the navigation jump method directly on the next page -- [self. navigationController pushViewController: viewController animated: YES];