This is part of the "iOS and Swift for Beginners" learning path. View Path

Mastering Auto Layout

May 17 2018 · Video Course (1 hr, 6 mins) · Intermediate

Dive a little deeper into auto layout. Learn more about creating complex constraints and creating universal layouts for all devices.

3/5 9 Ratings

Version

  • Swift 4, iOS 12, Xcode 10

Constraints

Introduction

2:23 Free

Join us for a tour of the Auto Layout features that will allow you to create universal layouts that work great on all devices.

1

Sometimes you'll want a property to be constrained not equal to another, but greater than or equal or to it, or less than!

2

Satisfy ambiguous or conflicting constraints by defining priorities for them, to match your intended design.

3

Create an Auto Layout-based treasure map using scroll views, combined with what else you've learned in this course.

4

Instead of using empty views to control the spacing of views, when you're not using Stack Views, you can use UILayoutGuides!

5

Layout anchors are used for creating constraints on views, in code. They also work on layout guides!

6

Use your Auto Layout coding skills along with your knowledge of Stack Views in order to simplify your layout code.

7

The Visual Format Language allows you to create many Auto Layout constraints, without requiring many lines of code.

8

Create the constraints necessary to achieve a simple three-view layout using the Visual Format Language.

9

Conclusion

0:23

You're well on your way to mastering constraints. It's time to begin doing the same for adaptive layout!

10

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!

11

Use size classes to create universal layouts: ones that take advantage of the smallest iPhone to the largest iPad!

12

Create an adaptive layout, combining your new knowledge of size classes with what you know about constraints.

13

Views and constraints aren't the only things you might want to vary by size class. Learn how to adjust fonts, images, and more.

14

Use the techniques learned in the last video to add a layout variation to two buttons based on environment width.

15

Learn about the types and protocols that form the basis for adaptive layout in iOS, for greater control in code.

16

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.

17

Conclusion

1:44

Let's have a recap of what you’ve learned in this course. Soon you'll be telling your own Auto Layout tales!

18

Contributors

Comments