From the course: Complete Guide to SwiftUI

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Size classes

Size classes

- [Instructor] Earlier in the course we looked at environment values. I mentioned two important values are size classes. I'd like to go a little deeper into them. Size classes are, we determine what shape your window is. This could be a device window or split pane. And so it's basic, there are two size classes and two values for the size classes. Knowing these are the fundamental way to check if your layout needs changing. There is a horizontal and vertical size class. The horizontal size class is a categorization of the width of the window. The vertical is the height. Size classes have only two values, regular and compact. Compact horizontal sizes are iPhones in both portrait and landscape. On the iPad it's the one third split view pane and the slide over pane as well. iPads in portrait, landscape, and half split views are regular width size classes. And for the vertical size class, an iPhone in portrait, an iPad in…

Contents