Created
November 20, 2012 07:44
-
-
Save ishida/4116621 to your computer and use it in GitHub Desktop.
Show ViewController and NavigationController
This file contains 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)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