Size classes
So now we've built out all of our views in our storyboard, connected them with segues, and set constraints using Auto Layout, and everything is perfect! Or… is it? If you've tried to rotate your phone into landscape, you may have noticed that everything is decidedly not perfect. Our constraints don't hold up particularly well when the screen becomes so wide and short.
But what should we do? It would be nearly impossible to come up with a set of constraints that are so robust that they work in all sizes and orientations that a device can come in. Luckily, there is one last feature that solves this very problem: size classes.
Size classes are a way to group constraints into categories that are general enough that you don't have to design for each individual device, but specific enough to change rules depending on the heights and widths of a device. The biggest use case for size classes are for when you switch between landscape and portrait modes, or when...