Change transition between UIViewControllers
Inside a UIViewController
transition = CATransition.animation
transition.timingFunction = CAMediaTimingFunction.functionWithName( KCAMediaTimingFunctionEaseIn)
transition.duration = 0.25
transition.type = KCATransitionMoveIn #Push Reveal
transition.subtype = KCATransitionFromRight
self.navigationController.view.layer.removeAllAnimations
self.navigationController.view.layer.addAnimation(transition, forKey:KCATransition)
vc=UIViewController.alloc.init
self.navigationController.pushViewController(vc, animated:false)
Types
kCATransitionFade
kCATransitionMoveIn
kCATransitionPush
kCATransitionReveal
Subtypes
kCATransitionFromRight
kCATransitionFromLeft
kCATransitionFromTop
kCATransitionFromBottom
Written by spnkr
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#