mainFrame = [[Test_Book1_2_Classes_ViewController alloc] init];
CATransition *transition = [CATransition animation];
transition.duration = 1.0f; /* 间隔时间*/
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; /* 动画的开始与结束的快慢*/
transition.type = @"pageCurl"; /* 各种动画效果*/
//@"cube" @"moveIn" @"reveal" @"fade"(default) @"pageCurl" @"pageUnCurl" @"suckEffect" @"rippleEffect" @"oglFlip"
transition.subtype = kCATransitionFromTop; /* 动画方向*/
transition.delegate = self;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
[self.navigationController pushViewController:mainFrame animated:YES];
需要引用:#import <QuartzCore/QuartzCore.h>
QuartzCore.framwork