Mastering Auto Layout
Dive a little deeper into auto layout. Learn more about creating complex constraints and creating universal layouts for all devices. By Jessy Catterwaul & Catie Catterwaul.
Part 1: Constraints
Join us for a tour of the Auto Layout features that will allow you to create universal layouts that work great on all devices.
Sometimes you'll want a property to be constrained not equal to another, but greater than or equal or to it, or less than!
Satisfy ambiguous or conflicting constraints by defining priorities for them, to match your intended design.
Create an Auto Layout-based treasure map using scroll views, combined with what else you've learned in this course.
Instead of using empty views to control the spacing of views, when you're not using Stack Views, you can use UILayoutGuides!
Layout anchors are used for creating constraints on views, in code. They also work on layout guides!
Use your Auto Layout coding skills along with your knowledge of Stack Views in order to simplify your layout code.
The Visual Format Language allows you to create many Auto Layout constraints, without requiring many lines of code.
Create the constraints necessary to achieve a simple three-view layout using the Visual Format Language.
You're well on your way to mastering constraints. It's time to begin doing the same for adaptive layout!
Part 2: Adaptive Layout
Adaptive layout is about dealing with different screen sizes, but it's also a lot more than that! Let's learn how deep this water is!
Use size classes to create universal layouts: ones that take advantage of the smallest iPhone to the largest iPad!
Create an adaptive layout, combining your new knowledge of size classes with what you know about constraints.
Views and constraints aren't the only things you might want to vary by size class. Learn how to adjust fonts, images, and more.
Use the techniques learned in the last video to add a layout variation to two buttons based on environment width.
Learn about the types and protocols that form the basis for adaptive layout in iOS, for greater control in code.
View controllers can adapt how they are presented based on the adaptive environment. Learn what the framework does for you and how to modify default behavior.
Let's have a recap of what you’ve learned in this course. Soon you'll be telling your own Auto Layout tales!