标签:
CATransition *animation = [CATransition animation];
[animation setDuration:0.2f];
[animation setTimingFunction:[CAMediaTimingFunction
functionWithName:kCAMediaTimingFunctionEaseIn]];
[animation setType:kCATransitionPush];
if (isLeft) {
[animation setSubtype: kCATransitionFromLeft];
} else {
[animation setSubtype: kCATransitionFromRight];
}
[bottomView.layer addAnimation:animation forKey:@"Reveal"];
直接把这段代码拷贝到需要界面切换的位置就可以了。bottomView是切换界面所在的界面。
具体参数请参考切换动画效果详细设置
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/liuyinghui523/article/details/47039483