Search code examples
iosuistoryboardios-universal-app

Creating an iPhone- and iPad-compatible app with a storyboard


I am trying to create an iPhone and iPad compatible app. Is there any good tutorial and example I can follow? Can I create one view or storyboard for each view and use it for iPhone and iPad? If I use a storyboard, can I do something like this: If it's iPhone, use this storyboard design, if iPad, use the other storyboard design. Or do I need to create a new view or storyboard for iPad and one for iPhone? I have no clue how to start at this moment.


Solution

  • You only need one storyboard to build an interface that is compatible with both iPad and iPhone models.

    Apple is now encouraging developers to embrace Adaptive User Interfaces. As their guide states, "With the latest advancements with View Controllers in iOS 8 and Auto Layout in Xcode, it’s now even easier for you to adapt your user interface to context and different sized devices". In other words, you only need a single storyboard for all iOS devices, also known as a "Universal" storyboard.

    This tutorial should get you started with Universal Storyboards and adaptive layout.