Question

I should create an app compatible with the screen sizes of the iPhones 4 and 5. On the web I found some ways to organize my project. The best ways to do it are to:

  • create two storyboards,call one when screen size is 568 and the other when screen size is 480

  • use autolayout and have an unique storyboard

I don't know how to use autolayout and I should learn its implementation in my project. Then in this situation, I want to know by your experience what's the best approach.

I think that first approach is very intricate and slow, with two storyboards you can make mistakes and don't have the same situation in each device. In my experience I used xib files, and I used two xib file for each viewcontroller, a solution which is very very noisy. Then, what can you tell me about these approaches?

Was it helpful?

Solution

AutoLayout will make it easier to adjust your UI for both screen size, but even with the old UIViewAutoresizing you will be able to get everything working.

I would suggest that you do not use 2 storyboards or NIB for that mater, because if a some point an other screen size is introduced you need to create a third storyboard/NIBs.

You can even use the UIViewAutoresizing in NIB and in code.

Just set the autoresizing mask correct to grow/shrink with the screen size and you will be good to go.

OTHER TIPS

Well , if you want to make app that run on both iOS 7 and iOS 6, than its better to use Autolayout, because it is easy to use, and also too much flexible. Because your other options are too much complex and time consuming as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top