【问题标题】:How to increase height of view by value in SnapKit?如何在 SnapKit 中按值增加视图高度?
【发布时间】:2020-06-11 11:16:50
【问题描述】:

我想在 SnapKit 中将高度增加 100,但我不知道该怎么做。它应该是这样的,但它不起作用

mainView.snp.makeConstraints { make in
    make.center.equalToSuperview()
    make.height.equalTo(otherView.snp.height + 100) // problem here
}

【问题讨论】:

    标签: ios swift snapkit


    【解决方案1】:

    您可以使用insetoffset

    make.height.equalTo(otherView.snp.height).offset(100)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-07
      • 1970-01-01
      • 2020-04-04
      • 2021-12-21
      • 1970-01-01
      • 2017-12-03
      • 2015-12-26
      相关资源
      最近更新 更多