229 |
* @"cube" 立方体翻滚效果 |
230 |
* @"moveIn" 新视图移到旧视图上面 |
231 |
* @"reveal" 显露效果(将旧视图移开,显示下面的新视图) |
232 |
* @"fade" 交叉淡化过渡(不支持过渡方向) (默认为此效果) |
233 |
* @"pageCurl" 向上翻一页 |
234 |
* @"pageUnCurl" 向下翻一页 |
235 |
* @"suckEffect" 收缩效果,类似系统最小化窗口时的神奇效果(不支持过渡方向) |
236 |
* @"rippleEffect" 滴水效果,(不支持过渡方向) |
237 |
* @"oglFlip" 上下左右翻转效果 |
238 |
* @"rotate" 旋转效果 |
239 |
* @"push" |
240 |
* @"cameraIrisHollowOpen" 相机镜头打开效果(不支持过渡方向) |
241 |
* @"cameraIrisHollowClose" 相机镜头关上效果(不支持过渡方向) |
242 |
*/ |
243 |
|
244 |
/** type |
245 |
* |
246 |
* kCATransitionFade 交叉淡化过渡 |
247 |
* kCATransitionMoveIn 新视图移到旧视图上面 |
248 |
* kCATransitionPush 新视图把旧视图推出去 |
249
* kCATransitionReveal 将旧视图移开,显示下面的新视图
ViewController *v = [[ViewController alloc] init];
CATransition *transition = [CATransition animation];
transition.duration = 1;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionReveal;
transition.subtype = kCATransitionFromTop;
transition.delegate = self;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
[self.navigationController pushViewController:v animated:NO];