Search code examples
iphonescreenscreen-sizeiphone-5

Making use of the extra pixels on 1136x640 iPhone 5 Screen?


Without the 1136 launch image, apps now run in letterbox mode with black bars on either end.

If you add the [email protected] launch image, then the app runs with 1136 pixels (in my case, in landscape mode - 1136x640).

The extra 176 pixels are all getting added to the right side of the screen in landscape mode.

Is there a way that I could have the 176 added pixels distributed 88 to the left and 88 to the right of the screen that I work with in Interface Builder?

To Explain: If I position an 1136x640 image (to make it work it is actually a 568x320 image with an @2x version in the project) at 0,0 in Interface Builder and run it on an iPhone 5/simulator, the screen shows the entire image even though it's not entirely visible in Interface Builder since it goes off the right side of the screen.

I was hoping to place the 1136x640 image at -88,0 since it is just a background image for my app. If this was possible, I could keep all the menu buttons in their current locations and would just be able to extend my app's background to either end instead of having that area be filled with black bars in letterbox mode.

If that is somehow possible I would love to hear about it... otherwise I better get to repositioning all my buttons and other screen elements! I've recently read about AutoLayout and that is certainly something to strongly consider in any new apps going forward, but I was just hoping for a quick update to my existing apps that would letterbox the apps with additional background art provided by me instead of black bars on either end.

EDIT: Just tried to move buttons around on the screen and it appears that buttons placed on the right-most 176 pixels can't even be clicked on! So I cannot use that extra space on the right even if I reposition everything... =/

AND THEN: I tried AutoLayout, and it too ignored the 176 pixels on the right. If I positioned a button with a constraint of 20 pixels from the right side of the screen, it would show 196 pixels from the right because it's not taking into account the additional screen size that has been added.

Anybody know what is the best way to actually have art fill the entire screen of the new iPhone 5?

Thanks!


Solution

  • Ended up creating one .xib for for the iPhone 5 size and one .xib for the iPhone 4 size. Both are connected to the same .h/.m file.