Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Auto-Layout.pdf

Shuai Liu
September 22, 2015

 Auto-Layout.pdf

Shuai Liu

September 22, 2015
Tweet

More Decks by Shuai Liu

Other Decks in Technology

Transcript

  1. Cassowary You provide rules, whether through IB or through code,

    and the Auto Layout system transforms those rules into view frames.
  2. 思路 • 合理的把⼦子View分组 • 确定⼤大致依赖关系 —— 要想确定A的位置,⾸首先我得知道B 的位置 & 只要B的位置定下来了,那么A的位置就可以被确定

    • 找出那些只依赖⽗父View的View(⼀一定存在),先 添加他们的约束 • 根据依赖关系,⼀一级⼀一级的添加约束