- why we need auto layout;
- what UITraitCollection is;
- what’s new in interface builder Xcode;
- about debugging view without running;
- how to debug custom view.
8. Visual format language
Standard Space
[button]-[textField]
Width Constraint
[button(>=50)]
Connection to Superview
|-50-[purpleBox]-50-|
Vertical Layout
V:[topField]-10-[bottomField]
Flush Views
[maroonView][blueView]
Priority
[button(100@20)]
Equal Widths
[button1(==button2)]
Multiple Predicates
[flexibleButton(>=70,<=100)]
Complete Line of Layout
|-[find]-[findNext]-
[findField(>=20)]-|
11. Why Auto Layout?
● Describe how views should be laid out in a relational
manner to their superview & sibling views
● Dynamically respond to application changes
● User provides constraints; system calculates the frames
● More power and control over springs and struts