understanding auto layout

24
Understanding Auto Layout iOS Development

Upload: henrique-morbin

Post on 08-Feb-2017

43 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Understanding Auto Layout

Understanding Auto Layout

iOS Development

Page 2: Understanding Auto Layout

Topics● Auto Layout and Constraints● Intrinsic Size● Preview and Double Length● Top and Bottom Guides● Leading and Trailing● Standard Values and Constraints to Margins● Relation and Priority● Compression Resistance/Hugging Priority● Tips● Other things to cover...

Page 3: Understanding Auto Layout

Auto Layout and Constraints

Page 4: Understanding Auto Layout

Auto Layout and Constraints

Page 5: Understanding Auto Layout

Auto Layout and Constraints

Page 6: Understanding Auto Layout

Intrinsic Size

Page 7: Understanding Auto Layout

Intrinsic Size

Page 8: Understanding Auto Layout

Preview and Double Length

Page 9: Understanding Auto Layout

Preview and Double Length

Page 10: Understanding Auto Layout

Preview and Double Length

Page 11: Understanding Auto Layout

Top and Bottom Guides

Page 12: Understanding Auto Layout

Leading and Trailing

Page 13: Understanding Auto Layout

Leading and Trailing

Page 14: Understanding Auto Layout

Standard Values and Constraints to Margins

Page 15: Understanding Auto Layout

Relation and Priority

Page 16: Understanding Auto Layout

Relation and Priority

Page 17: Understanding Auto Layout

Compression Resistance/Hugging Priority

Page 18: Understanding Auto Layout

Compression Resistance/Hugging Priority

Page 19: Understanding Auto Layout

Compression Resistance/Hugging Priority

Page 20: Understanding Auto Layout
Page 21: Understanding Auto Layout
Page 22: Understanding Auto Layout

Tips● Group amount of views that have the same constraints with the superview;

● Don't worry about errors and warnings before complete fully describe your

layout;

● Avoid use "Add Missing Constraints" because almost never add what you

really want;

● When you have to fix too many issues in autolayout, prefer remove all

constraints and add it again.

Page 23: Understanding Auto Layout

Other things to cover...● Constraints in code;● Visual format language;● Animations;● Adaptive Layouts;● Stack Views (autolayout without constraints).