ThePunisher
ThePunisher

Reputation: 410

iPhone 5 Wrong Screen Height

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

Upvotes: 3

Views: 712

Answers (3)

P.J
P.J

Reputation: 6587

It's very simple, just add [email protected] which is Default image for iPhone 5 to the project.

Upvotes: 3

Thilo
Thilo

Reputation: 262734

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).

Upvotes: 6

Ilanchezhian
Ilanchezhian

Reputation: 17478

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

Upvotes: 3

Related Questions