首页 > 其他 > 详细

tabbar动画切换

时间:2014-07-18 12:19:34      阅读:416      评论:0      收藏:0      [点我收藏+]

效果1:

     UIViewController *vc = self.viewControllers[self.selectedIndex];

        CATransition *animation =[CATransition animation];

        [animation setDuration:0.75f];

        [animation setTimingFunction:[CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionDefault]];

        [animation setType:kCATransitionMoveIn];

        [animation setSubtype:kCATransitionFromRight];

        [vc.view.layer addAnimation:animation forKey:@"reveal"];

 

效果2:

 

     CATransition *animation =[CATransitionanimation];

      [animation setDuration:0.75f];

        [animation setTimingFunction:[CAMediaTimingFunctionfunctionWithName:kCAMediaTimingFunctionDefault]];

        [animation setType:kCATransitionMoveIn];

        [animation setSubtype:kCATransitionFromRight];

        [self.view.layer addAnimation:animation forKey:@"reveal"];

 

 

运行看效果!

tabbar动画切换,布布扣,bubuko.com

tabbar动画切换

原文:http://www.cnblogs.com/yangmx/p/3853026.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!