Skip to content

Instantly share code, notes, and snippets.

@aug2uag
Last active January 2, 2016 13:09
Show Gist options
  • Select an option

  • Save aug2uag/8307630 to your computer and use it in GitHub Desktop.

Select an option

Save aug2uag/8307630 to your computer and use it in GitHub Desktop.
Programmatically instantiate ViewController in AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor clearColor];
ViewController *viewController = [[ViewController alloc] init];
self.window.rootViewController = viewController;
[self.window makeKeyAndVisible];
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment