Skip to content

Instantly share code, notes, and snippets.

@ishida
Created November 20, 2012 07:44
Show Gist options
  • 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