0

Possible Duplicate:
How to develop or migrate apps for iPhone 5 screen resolution?

We have an iOS 5 app which uses 3,5" retina display. I read that in iPhone 5 4" retina display, the app is shown in center of screen, by adding two black bars, one on top and another on bottom of screen. In my case and using Xcode emulator these bars don't display. The app is shown using whole screen like this:

Huge screenshot

What is the problem? How to solve this situation?

Community
  • 1
  • 1
jcamacho
  • 818
  • 2
  • 12
  • 25
  • See this link [link](http://stackoverflow.com/questions/12395200/how-to-develop-or-migrate-apps-for-iphone-5-screen-resolution). it might help you – kumareshm174 Dec 05 '12 at 09:05

2 Answers2

1

The layout will follow the way the resize and pinning struts are set for each of the views. The tab bar is pinned to the bottom of the screen, which is why it is there. I'm not sure what you have going on that is making the background duplicate a portion of itself like that.

But in Interface Builder, you can click the button in the lower right corner to toggle between the older iPhone 3.5" and iPhone 5 4" screen sizes and see how your views adjust their layout on each screen. Ideally, you will want to rework your app so that the background assets can fill the full 4" screen and simply crop off the bottom portion on the older screens.

Similarly, the controls and subviews should have their autosizing resize and pinning struts set in the size inspector so that they will stretch or reposition properly on both screens. Views like UITableView and UIScrollView are easily stretched to fill the additional screen. Other views such as buttons and text fields usually remain static in their sizes and positions relative to either the top or the bottom.

Jeff Lockhart
  • 5,379
  • 4
  • 36
  • 51
  • I just want my application to display correctly on an iPhone 5, but do not want to change the target of my app to iOS 6, to do this, I have to adapt the whole application?, I thought it did automatically ... – jcamacho Dec 05 '12 at 09:27
  • You do not have to change the deployment target to iOS 6 in order to perform these changes to your views in Interface Builder. The latest version of Xcode will have the toggle control from 3.5" to 4" screen sizes. Whether or not it will display like you want it to automatically has everything to do with the position of your subviews and the settings in size inspector. – Jeff Lockhart Dec 05 '12 at 09:41
  • I just run the app on iPhone 5 device (no emulator) and the app its show correctly, with two black frames and the app appear center on screen... The only difference to current app on the store is the new launch image for iPhone 5 (4"), but this launch image is need to upload new release to store... – jcamacho Dec 05 '12 at 16:07
1

I had the same problem. Just add the splash screen image to the project. You should name it as Default-568h@2x.png. When you add the Default-568h@2x.png image the program can understand that this app also supports the iPhone5.

elixenide
  • 44,308
  • 16
  • 74
  • 100
sri
  • 227
  • 2
  • 12