Created
April 7, 2014 16:39
-
-
Save g-1/10023803 to your computer and use it in GitHub Desktop.
Storyboardで3.5inchディスプレイに手っ取り早く対応する。 ref: http://qiita.com/g-1/items/074aa4a3f0f886e271ec
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 | |
{ | |
//3.5inchと4inchを読み分けする | |
CGRect rect = [UIScreen mainScreen].bounds; | |
if (rect.size.height == 480) { | |
UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"3_5_inch" bundle:nil]; | |
UIViewController* rootViewController = [storyboard instantiateInitialViewController]; | |
self.window.rootViewController = rootViewController; | |
} | |
return YES; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment