Created
May 26, 2013 22:41
-
-
Save indyfromoz/5654297 to your computer and use it in GitHub Desktop.
Separate storyboard for iPhone 5
This file contains hidden or 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
CGSize iOSDeviceScreenSize = [[UIScreen mainScreen] bounds].size; | |
if (iOSDeviceScreenSize.height == 480){ | |
UIStoryboard *iPhone35Storyboard = [UIStoryboard storyboardWithName:@"Storyboard_iPhone4" bundle:nil]; | |
UIViewController *initialViewController = [iPhone35Storyboard instantiateInitialViewController]; | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
self.window.rootViewController = initialViewController; | |
} | |
if (iOSDeviceScreenSize.height == 568){ // iPhone 5 | |
UIStoryboard *iPhone4Storyboard = [UIStoryboard storyboardWithName:@"Storyboard_iPhone5" bundle:nil]; | |
UIViewController *initialViewController = [iPhone4Storyboard instantiateInitialViewController]; | |
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; | |
self.window.rootViewController = initialViewController; | |
} | |
[self.window makeKeyAndVisible]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment