16 Size Classes

Often, you want an application’s interface to have a different layout depending on the dimensions and orientation of the screen. In this chapter, you will modify the interface for DetailViewController in Homepwner so that when it appears on a screen that has a relatively small height, the set of text fields and the image view will be side by side instead of stacked on top of one another (Figure 16.1).

Figure 16.1  Two possible layouts for Homepwner’s DetailViewController

Two possible layouts for Homepwner’s DetailViewController

The relative sizes of screens are defined in size classes. A size class represents a relative amount of screen space in a given dimension. ...

Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.