I have no idea how to set constrant.height to constant value:
override func updateConstraints() {
layout(view) { view in
let viewHeight = 67
view.top == view.superview!.top
view.left == view.superview!.left
view.height == viewHeight // Error: Binary operator '==' cannot be applied to operands of type 'Dimension' and 'Int'
view.width == view.superview!.width
}
super.updateConstraints()
}
This should be simple, put as a Swift newbie atm I don't have any working idea, would welcome any help :)
You probably solved this one by yourself, but for anybody else it seems that the ==-operator is not overloaded for Int. So changing the definition of your variable to:
will do the trick.