I am using the following code in my AppDelegate.m to detect which device the user is using:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone)
{
CGSize result = [[UIScreen mainScreen] bounds].size;
if(result.height == 480)
{
NSLog(@"iPhone 3,5 Inch");
[UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil];
}
if(result.height == 568)
{
NSLog(@"iPhone 4 Inch");
[UIStoryboard storyboardWithName:@"iPhone5-storyboard" bundle:nil];
}
}
return YES;
}
But when I build the App the NSLog is shown, but no Storyboard is coming up...
- The Main Storyboard field in the Deployment info is empty so that the code decided what to load...
Can some help me?
Thx and best regards from Germany
Laurenz :)
Here is a way I now found on a other post: