原文:http://blog.csdn.net/zaitianaoxiang/article/details/7078015
pageCurl 向上翻一页
pageUnCurl 向下翻一页
rippleEffect 滴水效果
suckEffect 收缩效果,如一块布被抽走
cube 立方体效果
oglFlip 上下翻转效果
// 准备动画
CATransition *animation = [CATransition animation];
//动画播放持续时间
[animation setDuration:3.0f];
/*动画速度,何时快、慢
(
kCAMediaTimingFunctionLinear 线性(匀速)|
kCAMediaTimingFunctionEaseIn 先慢|
kCAMediaTimingFunctionEaseOut 后慢|
kCAMediaTimingFunctionEaseInEaseOut 先慢 后慢 中间快|
kCAMediaTimingFunctionDefault 默认|
)
*/
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]];
/*动画效果
(
kCATransitionFade淡出|
kCATransitionMoveIn覆盖原图|
kCATransitionPush推出|
kCATransitionReveal底部显出来
)
*/
[animation setType:kCATransitionPush];
/*动画方向
(
kCATransitionFromRight|
kCATransitionFromLeft|
kCATransitionFromTop|
kCATransitionFromBottom
)
*/
if (nextControllerIndex < currentControllerIndex)
[animation setSubtype:kCATransitionFromRight];
else
[animation setSubtype:kCATransitionFromLeft];
[viewController.view.layer addAnimation:animation forKey:@"Reveal"];
网友评论