Skip to content

Instantly share code, notes, and snippets.

@zpao
Created March 16, 2012 06:42
Show Gist options
  • Save zpao/2048807 to your computer and use it in GitHub Desktop.
Save zpao/2048807 to your computer and use it in GitHub Desktop.
Xcode generates code with excellent whitespace...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
self.mainViewController = [[ZMainViewController alloc] initWithNibName:@"ZMainViewController_iPhone" bundle:nil];
} else {
self.mainViewController = [[ZMainViewController alloc] initWithNibName:@"ZMainViewController_iPad" bundle:nil];
}
self.window.rootViewController = self.mainViewController;
[self.window makeKeyAndVisible];
return YES;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment