【问题标题】:Dive into implementation of updateConstraints() method深入了解 updateConstraints() 方法的实现
【发布时间】:2018-03-09 22:41:10
【问题描述】:

有一个问题:我应该在调用<view>.snp.updateConstraints() 方法后调用setNeedsLayout()layoutIfNeeded() 吗?

还是默认实现updateConstraints()就可以了?

提前致谢!

【问题讨论】:

    标签: snapkit


    【解决方案1】:

    没必要。你可以拨打updateConstraints()

    关于 setNeedsLayout()layoutIfNeeded() 你可以在这里阅读:https://medium.com/@abhimuralidharan/ios-swift-setneedslayout-vs-layoutifneeded-vs-layoutsubviews-5a2b486da31c

    【讨论】:

      猜你喜欢
      • 2016-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-11
      • 2020-05-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多