Created
February 1, 2014 17:06
-
-
Save romyilano/8755258 to your computer and use it in GitHub Desktop.
grab a reference to the initial view controller while launching with a storyboard
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 | |
{ | |
// Override point for customization after application launch. | |
UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController; | |
MasterViewController *controller = (MasterViewController *)navigationController.topViewController; | |
controller.managedObjectContext = self.managedObjectContext; | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment