Adaptive Layout and the Size Class

Apple introduced the concept of adaptive user interfaces in iOS 8 relying on a combination of Auto Layout and size classes. Building user interfaces that adapt to changes in size class became even more important when Apple added slide over and split screen support in iOS 9.

Size Classes

There are two size classes that can apply to the horizontal (width) or vertical (height) dimension of an application interface:

  • regular: meaning your interface has expansive space.
  • compact: meaning your interface has only constrained space.

iPhone 6 Plus

The iPhone 6 Plus is the only iPhone device that has a regular width in landscape orientation. The longest dimension is always regular and the shortest dimension is always compact.

Size Classes iPhone 6 Plus

All Other iPhone Models

The other iPhone models have a trickier set of size classes to remember. The longest dimension of the device is regular in portrait but only compact in landscape.

Size Classes iPhone

iPad

full screen iPad application always has regular height and width size classes regardless of orientation.

Size Classes iPad

iPad Split Screen and Slide Over

The multi-tasking views introduced in iOS 9 complicate the situation for the iPad. For the first time an iPad application can find it itself running with a compact horizontal size class. Another assumption that no longer holds is that the window and screen bounds will always be the same.

Size Classes Slide Over Portrait

Size Classes Slide Over Landscape

Size Classes Split Screen

 

 

tomkausch

Leave a Reply

Your email address will not be published. Required fields are marked *