如何在 SnapKit 中按值增加视图高度?

How to increase height of view by value in SnapKit?

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

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

您可以使用 insetoffset:

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