Skip to content

Instantly share code, notes, and snippets.

@jungchris
Last active August 29, 2015 14:16
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 jungchris/7d0b2b41a171dfccb5ca to your computer and use it in GitHub Desktop.
Save jungchris/7d0b2b41a171dfccb5ca to your computer and use it in GitHub Desktop.
Initiate Storyboard Programmatically
- (void)applicationDidBecomeActive:(UIApplication *)application
{
if (!application.keyWindow.rootViewController)
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController *myViewController= [storyboard instantiateViewControllerWithIdentifier:@"myViewController identifier"];
application.keyWindow.rootViewController = myViewController;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment