Skip to content

Instantly share code, notes, and snippets.

@carljparker
Last active August 29, 2015 14:22
Show Gist options
  • Save carljparker/0de2ab3fbb68a3a4f2f8 to your computer and use it in GitHub Desktop.
Save carljparker/0de2ab3fbb68a3a4f2f8 to your computer and use it in GitHub Desktop.
Change Initial View Controller at App Startup
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
NSLog( @"Window: %@", self.window.rootViewController );
self.window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"MapKitNavigationController"];
self.window.rootViewController = viewController;
[self.window makeKeyAndVisible];
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment