Search code examples
iphoneiphone-5

Extend app for iPhone 5 - best practice


Now that Apple is about to start shipping iPhone 5's, I'm looking into extending my applications so they appear full screen on the iPhone 5. I ran my apps on the simulator, and even the ones with a UITableView extending to the bottom of the screen, the black bars appear at the top and bottom of the screen.

Here's my question: What is the best practice for extending apps for the iPhone 5?

Should I make a separate nib now for the 3.5 and 4 inch screen, or extend everything in code?

I'm trying to make this as smooth a transition as possible, so I appeal to knowledge of SO to clue me in onto what the best way is to build for both screens.


Solution

  • Taking advantage of the full 4" screen in your apps seems to be as simple as adding a new Default image named Default-568h@2x.png with size 640 x 1136. Xcode 4.5 will actually offer to do this for you automatically by adding a black image of the proper size and name to your project.

    For apps that use standard UI components, such as table views, the tables are magically extended to fill the screen. I updated an app for work and it was literally this simple, with only a couple minor issues related to my own code and UI setup. But all in all, very easy.

    Contrast this with another app I work on (for myself), which uses none of the standard UI components except for UIViews. To deal with both 3.5" and 4" screens, I have had to spend quite a bit of time refactoring code that needs to know screen size for various operations of the app. (The app in this case is more of a game/simulator than say, a productivity app.)

    So, your mileage may vary with regard to the level of effort really required to support the 4" screen. It will depend on how complicated and "non-standard" your app is, as I have discovered.