0

Enabling Autolayout in .xib or .storyboard and adding a splash screen of 640px by 1136px enables iPhone 5 resolution support for the taller screen.

However, doing so, my app started to display some funny things where I assume autolayout is not a great idea.

I am wondering if there is a way to enable iPhone 5 device support, i.e. fix app's resolution without using Autolayout? Maybe I can set in the code?

If yes, then I will have no need to create 2 storyboards or nibs to support iOS5- and iOS6.

Vad
  • 3,658
  • 8
  • 46
  • 81

2 Answers2

2

If you weren't using Autolayout before, you won't need to use it for iPhone 5 support.

When you're putting your interface together, you just need to check your bindings, and toggle between the taller phone size, and the regular phone size, as described here: Xcode Storyboard displaying the new iPhone 5 screen size?

If your screens look fine in both screen sizes then you're done.

If you are doing a lot of coding to show your UI, then you'll have more work to do.

Community
  • 1
  • 1
Dan Morrow
  • 4,433
  • 2
  • 31
  • 45
1

I found a great answer a couple weeks ago (link below). You will copy and paste your older iPhone Storyboard, rename it to reflect the iPhone 5, and press the button that expands the screen size, found on the bottom of the layout grid. Some minor coding adjustments might be needed, but this sample code is used in the AppDelegate to detect which device is running, and hence, which Storyboard to use. You'll just have to duplicate your interfaces, but these GUI changes can be made without code and without AutoLayout (also good to note that AutoLayout removes iOS 5--and lower--compatibility)

xcode 4.5 how to pick storyboards at launch

Community
  • 1
  • 1
Scott
  • 110
  • 1
  • 1
  • 9