美文网首页
Auto Layout 的新特性

Auto Layout 的新特性

作者: coderzcj | 来源:发表于2016-07-18 16:23 被阅读7次

    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 的新特性

          本文链接:https://www.haomeiwen.com/subject/kndjjttx.html