Created
August 5, 2014 06:40
-
-
Save sergenes/3e8cf67b771c9bca3b5d to your computer and use it in GitHub Desktop.
Reset Storyboard to Initial View Controller
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
- (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