params during runtime • Relation between 2 views • Linear formula foo.left = 2 × bar.width + 100 • IB will generate adequate constraints automatically • For coding: visual format language & API Saturday, December 15, 12
of buttons • ... Parent-based layout views stay independently, may overlap ᶃ ᶄ ᶅ ᶆ ᶇ ᶈ ᶃ ᶄ ᶅ ᶆ ᶇ ᶈ Leave one dimension undefined as the tolerance to absorb the calculation errors Saturday, December 15, 12
> 4) • some views may end up with negative dimension • Solutions • Remove the conflicting constraints • Adjust the priority of constraints Saturday, December 15, 12
a fixed window size • Inequality constraints break the Rule of 4 • Redundant constraints • Hard to debug • Try using intrinsic content size & priority before adding inequality constraints Saturday, December 15, 12
Notes • A special case of UIScrollView • WWDC 2012 • Introduction to Auto Layout for iOS and OS X • Auto Layout by Example • Best Practices for Mastering Auto Layout Saturday, December 15, 12