Skip to content

Instantly share code, notes, and snippets.

@sugendran
Created November 11, 2012 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sugendran/4056604 to your computer and use it in GitHub Desktop.
Save sugendran/4056604 to your computer and use it in GitHub Desktop.
Fade between view controllers in the UINavigationController
// 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