Do we need to use 2 Storyboard for a Universal app?

J J picture J J · Oct 14, 2014 · Viewed 13.5k times · Source

I have a project for iPhone and iPad. The iPad needs a split view controller. Do we create two separate storyboards? One for iPhone (using autolayout we can support all devices) and two for iPad. My doubt is the difference it only in initial view. The inside views repeats. How will be your approach with storyboard ?

Answer

Amir Rezvani picture Amir Rezvani · Oct 14, 2014

No need for two storyboards any more in iOS 8! We can use Adaptive UI in order to tailor the same storyboard all different sizes of iPad and iPhone.

You can find a nice tutorial in here http://www.raywenderlich.com/83276/beginning-adaptive-layout-tutorial

And also you can find a nice video by apple in WWDC conference here and search for "Building Adaptive Apps with UIKit"

Basically we can handle different screen sizes by defining elements of our UI in storyboard for different size classes. We can also define different Auto layout constraints for different size classes.

And these are all possible size classes in iOS 8 ( I took the image from https://medium.com/@getaaron/ios-8-development-tips-for-iphone-6-and-iwatch-1c772554ffe0)

enter image description here