View Properties

Intrinsic Content Size
Compression Resistance
Content Hugging

-stack view
axis, spacing, alignment, distribution

happily modifies size of view
-> fill(default), fill equally, fill proportionally

works hard not to modify size of views
->equal spacing, equal centering

alignment -horizontal stack views
text-> ascender, baseline, descender

guiding principles of autolayout
-stackView first, constraints later
-Start small, or not at all
-Work from the inside out
-Trust the simulator only
-Don’t panic

Seven Commandments of AutoLayout
1. Tweak the properties of the StackView
2. Use another StackView
3. Tweak the compression resistance or the hugging priority
4. Add constraints to the StackView
5. Add constraints to the views
6. To connect views within different StackViews, use V.
7. If everything else fails, use a filler view