Skip to content

Instantly share code, notes, and snippets.

@naiveal
Created July 26, 2012 23:26
Show Gist options
  • Save naiveal/3185219 to your computer and use it in GitHub Desktop.
Save naiveal/3185219 to your computer and use it in GitHub Desktop.
Push Controller with transition
- (void) pushController: (UIViewController*) controller
withTransition: (UIViewAnimationTransition) transition
{
[UIView beginAnimations:nil context:NULL];
[self pushViewController:controller animated:NO];
[UIView setAnimationDuration:.5];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationTransition:transition forView:self.view cache:YES];
[UIView commitAnimations];
// [UIView transitionWithView:self.view
// duration:5.0
// options:transition
// animations:^{
// [self.navigationController pushViewController:controller animated:NO];
// } completion:^(BOOL finished){
// }];
}
//[self.navigationController popViewControllerAnimated:YES];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment