I am using this code to adapt my storyboard depending on device (iphone 5 or less):
if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
if(UIScreenOverscanCompensationScale==1136/640){
//move to your iphone5 storyboard
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"iphone5 storyboard" bundle:[NSBundle mainBundle]];
}
else{
//move to your iphone4s storyboard
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:[NSBundle mainBundle]];
}}
The code doesn’t work even if I just place:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"iphone5 storyboard" bundle:[NSBundle mainBundle]];
…it still loads iphone normal.
I put it under:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
in app delegate. Is this right?? In the app settings I chose the original iphone storyboard
I managed to solve it in this way: