Jonas Anderson
Jonas Anderson

Reputation: 1987

Launch image off by 20 pixels (on y axis)

I have a 320×480 sized launch image named 'Default.png' and the app is configured to also display how the status bar.

When my app launches, the image's top 20 pixels are cut off and hidden by the status bar.

According to Apple's HIG, the listed dimensions for iPhone and iPod Touch in Portrait mode are are: 320 x 480 pixels 640 x 960 pixels (high resolution)

How do I make it shift so the image is shown correctly, below the status bar?

Upvotes: 2

Views: 1836

Answers (2)

Lee82UK
Lee82UK

Reputation: 33

With the status bar, the usable screen space is 320x460 (640x920) I would guess the top is being cut off as your autoresizing mask / anchor points for your view are locked to the bottom of the screen. You can check this in interface builder inspector under the size tab. You have 3 options:

  1. Set the anchor points to top of the screen, which will force the view/image downwards and cut off the bottom rather than the top
  2. Set the image to stretch/fit the view, although this may look bad
  3. Use a separate image depending on whether the statusbar is shown or not.

Upvotes: -1

Daniel Dickison
Daniel Dickison

Reputation: 21882

You should just design your launch image with the assumption that the top 20 pixels will be cut off by the status bar.

Alternatively, you could set UIStatusBarHidden to YES in your info.plist, then when the app launches programmatically show the status bar with [UIApplication sharedApplication].statusBarHidden = NO.

Upvotes: 3

Related Questions