Screen height for iPhone4 with 4-inch screen

2.9k views Asked by At

I wanna update my app, that is created using iOS5 SDK, to fit iPhone5's 4-inch screen. I simulate it with iPhone5 simulator. The following code tells us that the screen height is still 480.00 but not 548. What should I do to let my app to be taller but without the black gap in the bottom of the iPhone5's 4-inch screen? Any help is appreciated:)

- (void)viewDidLoad
{
    [super viewDidLoad];

    float screenHeight = [UIScreen mainScreen].bounds.size.height;
    NSLog(@"screenHeight :%f",screenHeight);
}

log:

2012-09-20 14:47:36.554 FF[61898:c07] screenHeight :480.000000
2

There are 2 answers

3
Jesper On BEST ANSWER

This is poorly documented by Apple, but it seems like you have to provide a 4-inch launch image to let iOS know that you are built to take advantage of the tall screen. Only then will you get to use the full screen.

0
Vineesh TP On

Screen size for iPhone and iPad is.

iPhone : Portrait : 320x460 Landscape : 480x300

iPad : Portrait : 768x1004 Landscape : 1024x748