Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone 5 Wrong Screen Height

Tags:

ios

ios5

I have developed an app on the 3.5 inch Screen and now I did a new Storyboard for the 4 inch screen and I do like follows to switch between storyboards on the appdelegate and I logged the screen height and it gives me 480.00000 check it:

NSLog(@"Checking Screen Size");
if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPhone)
{    
    NSLog(@"On iPhone");
    CGSize iOSDeviceScreenSize = [[UIScreen mainScreen] bounds].size;

    if (iOSDeviceScreenSize.height == 480)
    {   (diagonally measured)
        NSLog(@"iPhone 4: %f", iOSDeviceScreenSize.height);
}
if (iOSDeviceScreenSize.height == 568)
{   
        NSLog(@"iPhone 5: %f", iOSDeviceScreenSize.height);
}

The NSLog gives me 480.0000 while my phone is iPhone 5

like image 654
ThePunisher Avatar asked Jun 16 '26 08:06

ThePunisher


2 Answers

You need to add a "tall" startup image [email protected] to the app to indicate that you support the new display size, otherwise you'll be run in compatibility mode (and not full screen).

like image 121
Thilo Avatar answered Jun 17 '26 21:06

Thilo


You should add a new default image [email protected] to the project.

like image 37
Ilanchezhian Avatar answered Jun 17 '26 21:06

Ilanchezhian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!