Auto Layout 的新特性

Incrementally Adopting Auto Layout

  1. 简单的resize,不用约束
  • Autoresizing masks will translate into constraints at runtime

translatesAutoresizingMaskIntoConstraints == true

  1. 复杂的用约束
  • Autoresizing masks are ignored

translatesAutoresizingMaskIntoConstraints == false

  1. Incremental Adoption
  • Auto Layout + Autoresizing masks

Design and Runtime Constraints

  1. Placeholder Constraints
  2. Design Time Intrinsic Size
    At runtime,

override var intrinsicContentSize: CGSize

  1. Turn Off Ambiguity Per View

你可能感兴趣的:(Auto Layout 的新特性)