码迷,mamicode.com
首页 > 移动开发 > 详细

ios ViewController present不同的方向

时间:2016-10-24 23:10:14      阅读:352      评论:0      收藏:0      [点我收藏+]

标签:first   animation   nbsp   self   iss   不同的   second   omr   media   

First ViewController

CATransition *transition = [CATransition animation];
transition.duration = 0.3;
transition.timingFunction = [CAMediaTimingFunction
    functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromRight;
[self.view.window.layer addAnimation:transition forKey:nil];
[self presentViewController:vc animated:NO completion:nil];

 

Second ViewController

CATransition *transition = [CATransition animation];
transition.duration = 0.3;
transition.timingFunction = [CAMediaTimingFunction
    functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromLeft;
[self.view.window.layer addAnimation:transition forKey:nil];
[self dismissViewControllerAnimated:NO completion:nil];

 

ios ViewController present不同的方向

标签:first   animation   nbsp   self   iss   不同的   second   omr   media   

原文地址:http://www.cnblogs.com/hd1992/p/5994690.html

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