Created
July 26, 2012 23:26
-
-
Save naiveal/3185219 to your computer and use it in GitHub Desktop.
Push Controller with transition
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
- (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