Lesson 2—10:
Auto Layout and Stack Views
Layout for multiple sizes
View as:
Interface Builder
Why Auto Layout?
Create alignment constraints
Text
Create size constraints
Text
Resolve constraint issues
Text
Safe area layout guide
Resolve constraint warnings
Text
Constraints between siblings
Stack views
Text
Stack view attributes
Stack views
Distribution
Alignment
Spacing
Size classes
Any
Any
Size classes
Compact
Regular
Size classes
Regular
Compact
Size classes
Compact
Compact
iPad
Size classes
Regular

height
Regular

width
Regular

width
Regular

height
iPhone
Size classes
Regular

height
Compact

width
Compact

width
Compact height
iPhone 6 Plus, iPhone 7 Plus, and iPhone 8 Plus
Size classes
Compact height
Regular

width
Auto Layout and Stack Views
Unit 2—Lesson 10
Learn the fundamentals of Auto Layout for building precisely designed user
interfaces.
Lab: Calculator
Unit 2—Lesson 10
Use view objects, constraints, and stack views to create
a simple calculator that maintains its layout on all device
sizes.
© 2017 Apple Inc. 

This work is licensed by Apple Inc. under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license.

Auto layout and stack views