Skip to content

Instantly share code, notes, and snippets.

@sergenes
Created August 5, 2014 06:40
Show Gist options
  • Save sergenes/3e8cf67b771c9bca3b5d to your computer and use it in GitHub Desktop.
Save sergenes/3e8cf67b771c9bca3b5d to your computer and use it in GitHub Desktop.
Reset Storyboard to Initial View Controller
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
_initalStoryboard = self.window.rootViewController.storyboard;
}
-(void) resetStoryBoard{
for (UIView* view in self.window.subviews)
{
[view removeFromSuperview];
}
UIViewController* initialScene = [_initalStoryboard instantiateInitialViewController];
self.window.rootViewController = initialScene;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment