-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Learning iOS UI Development
By :

Storyboard and XIB files can be used in conjunction with size classes. You can think of this as the ability to specify different layouts in the same file without adding a single line of code.
This is obviously a huge improvement to our workflow; among other things, we can now define universal applications using the same Storyboard for iPad and iPhone without duplicating all the IBOutlet
and IBAction
connections and subsequently update just a single file instead of keeping two different Storyboards synchronized.
Let's explore this with a simple example of how easy it is to handle size classes with Interface Builder.
The main goal of the next example is creating a layout that's suitable for iPhone and another one that looks great on iPad, using the same Storyboard for both. We will create a simple hierarchy based on two views that we will call "Menu view" and "Detail view". It is something similar to what we can obtain using UISplitViewController...
Change the font size
Change margin width
Change background colour