Created
November 11, 2012 22:51
-
-
Save sugendran/4056604 to your computer and use it in GitHub Desktop.
Fade between view controllers in the UINavigationController
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// will use a fade transition for the next push or pop on the view controllers stack | |
-(void) setNavigationTransition | |
{ | |
CATransition* transition = [CATransition animation]; | |
transition.duration = 0.5; | |
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
transition.type = kCATransitionFade; | |
[self.navigationController.view.layer addAnimation:transition forKey:nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment