Skip to content

Instantly share code, notes, and snippets.

@ishida
Created November 20, 2012 07:44
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 ishida/4116621 to your computer and use it in GitHub Desktop.
Save ishida/4116621 to your computer and use it in GitHub Desktop.
Show ViewController and NavigationController
+ (void)showViewControllerAndNavigationControllerFromParentViewController:(UIViewController *)parentVC
{
AViewController *vc = [[[AViewController alloc] init] autorelease];
UINavigationController* nc = [[[UINavigationController alloc]
initWithRootViewController:vc] autorelease];
nc.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
vc.navigationController = nc;
vc.navigationBar = nc.navigationBar;
[parentVC presentModalViewController:nc animated:YES];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment