Skip to content

Instantly share code, notes, and snippets.

@orta
Forked from autresphere/gist:5300529
Created April 3, 2013 12:41
Show Gist options
  • Save orta/5300837 to your computer and use it in GitHub Desktop.
Save orta/5300837 to your computer and use it in GitHub Desktop.
- (void) pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
newViewController.view.frame = //original frame
[self addChildViewController:newViewController];
[self transitionFromViewController:oldViewController
toViewController:newViewController
duration:(animated?0.35f:0)
options:0
animations:^{
newViewController.view.frame = //new frame
}
completion:^(BOOL finished) {
[newViewController didMoveToParentViewController:self];
}];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment