Skip to content

Instantly share code, notes, and snippets.

@kirang89
Created May 19, 2014 16:27
Show Gist options
  • Save kirang89/ac7aa09dfd9cd6d73a35 to your computer and use it in GitHub Desktop.
Save kirang89/ac7aa09dfd9cd6d73a35 to your computer and use it in GitHub Desktop.
Init snippet for setting the root view controller
- (BOOL) application:(UIApplication *)applicationdidFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
self.viewController = [[ViewController alloc] initWithNibName:nil
bundle:nil];
self.window = [[UIWindow alloc]
initWithFrame:[[UIScreen mainScreen] bounds]];
/* Make our view controller the root view controller */
self.window.rootViewController = self.viewController;
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment