0

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

If you add the Default-568h@2x.png 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!

RanLearns
  • 4,086
  • 5
  • 44
  • 81

3 Answers3

2

I had the same problem of not being able to access the new 176 pixels for the new iPhone. However, this is what I did and now I have access to them.

Open MainWindow.xib with Interface Builder Select the Window In Attributes, check Visible at Launch and Full Screen at Launch.

beastliest
  • 21
  • 1
0

If you hadn't set autoresizing on any of your elements and then enable support for the 4-inch display, indeed you might not have the greatest looking views.

You can use autoresizing to set your views/elements to stretch, center and align, so you should be able to manipulate the resizing mask to do what you'd like.

Autolayout is very fiddly and in most cases overkill if you just want to support the new screen size.

ttarik
  • 3,824
  • 1
  • 32
  • 51
  • Why are we offered the option to NOT run in letterbox, to instead show the extra 176 pixels as a part of our app, but only on one side and users can't interact with anything in that area? Wouldn't it make more sense just to force everyone to letterbox if there is no way to make use of that extra space? – RanLearns Sep 22 '12 at 10:07
  • It only appears that way because of your layout configuration. You can make use of the extra space, but your views need to be made to stretch to that size. – ttarik Sep 22 '12 at 10:18
0

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.

RanLearns
  • 4,086
  • 5
  • 44
  • 81