【发布时间】: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
}
【问题讨论】:
我想在 SnapKit 中将高度增加 100,但我不知道该怎么做。它应该是这样的,但它不起作用
mainView.snp.makeConstraints { make in
make.center.equalToSuperview()
make.height.equalTo(otherView.snp.height + 100) // problem here
}
【问题讨论】:
您可以使用inset 或offset:
make.height.equalTo(otherView.snp.height).offset(100)
【讨论】: