understanding auto layout

Post on 08-Feb-2017

43 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Understanding Auto Layout

iOS Development

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...

Auto Layout and Constraints

Auto Layout and Constraints

Auto Layout and Constraints

Intrinsic Size

Intrinsic Size

Preview and Double Length

Preview and Double Length

Preview and Double Length

Top and Bottom Guides

Leading and Trailing

Leading and Trailing

Standard Values and Constraints to Margins

Relation and Priority

Relation and Priority

Compression Resistance/Hugging Priority

Compression Resistance/Hugging Priority

Compression Resistance/Hugging Priority

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.

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

Thank you!Henrique Morbin

henrique.morbin@ilegra.comgithub.com/Morbix

top related