码迷,mamicode.com
首页 > 其他好文 > 详细

UINavigationController切换controller动画设置

时间:2014-12-16 14:57:59      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   ar   io   color   os   使用   sp   

http://blog.csdn.net/dabiaoyanjun/article/details/7774775



uinavigationcontrolleranimation
在pushViewController:animated:时使用非默认的页面转换特效
1. 首先要明确的是,不使用pushViewController的默认动画,所以在调用这个函数时,要将animated设置为NO.

2. 使用普通的来CATransition实现转换效果,代码如下:

    CATransition *animation = [CATransition animation];  
    [animation setDuration:0.3];  
    [animation setType: kCATransitionMoveIn];  
    [animation setSubtype: kCATransitionFromTop];  
    [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault]];  
    [self.navigationController pushViewController:m_poseAddIssueViewController animated:NO];  
    [self.navigationController.view.layer addAnimation:animation forKey:nil];  

 

UINavigationController切换controller动画设置

标签:style   blog   http   ar   io   color   os   使用   sp   

原文地址:http://www.cnblogs.com/allanliu/p/4167001.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!