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 ?
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)
For iOS 7 and before, yes, use two storyboards and two completely different interfaces, since there is no split view controller on the iPhone.
For iOS 8, use one storyboard, and use the UISplitViewController on both the iPad and the iPhone. Make a new project from the Universal version of the Xcode 6 Master-Detail app template to see all about how it works! It is automatically a split view controller on the iPad and a navigation interface on the iPhone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With