Here is what I am trying to achieve with SnapKit, but it does not compile for obvious reasons.
contentView.snp.makeConstraints { (make) in
make.top.equalTo(scrollView).offset(scrollView.snp.height * 0.2) //ERROR - Binary operator cannot be applied to type ConstraintItem and Double
}
Try:
contentView.snp.makeConstraints { make in
make.height.equalToSuperview().dividedBy(2)
make.left.right.bottom.equalToSuperview()
}