1

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
lu yuan
  • 7,207
  • 9
  • 44
  • 78
  • Hm, strange. I use this peace of code: CGRect frame = [UIScreen mainScreen].bounds; NSLog(@"Width = %f", frame.size.width); NSLog(@"Height = %f", frame.size.height); and I get Width = 320 and Height = 568; Did you set in iOS Simulator that it uses iPhone Retina 4 Inch? – uerceg Sep 20 '12 at 07:12

2 Answers2

5

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.

Jesper
  • 7,477
  • 4
  • 40
  • 57
0

Screen size for iPhone and iPad is.

iPhone : Portrait : 320x460 Landscape : 480x300

iPad : Portrait : 768x1004 Landscape : 1024x748

Vineesh TP
  • 7,755
  • 12
  • 66
  • 130