Auto Layout Guide - Notes

Auto Layout Guide: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/index.html#//apple_ref/doc/uid/TP40010853-CH7-SW1

  • 优先使用 stack view,可简化设置(个人认为还是有时候还是非常复杂的布局还是不用,增加复杂度)
  • Constraint等式表示相等,而非赋值,表示两个 view 的关系
  • From the view’s intrinsic content size, it’s easy to understand: Compression Resistance & Content Hugging.
  • 尽量和最邻居的 view 建立 Constraint