I essentially have two buttons laid out in a larger view, and I want the distance between the buttons to be equal to a multiple of the larger view. For example, I want to do something like:
var buttonOneRightConstraint = NSLayoutConstraint(item: button1, attribute: .Right, relatedBy: .Equal, toItem: button2, attribute: .Left, multiplier: 1.0, constant: -largerView.frame.width/10)
Which works well in one orientation, but doesn't update when the view size changes (e.g., device is rotated).
I think I would want to have it calculate largerView.frame.width every time the view is updated, as opposed to treat it like a constant, but not sure how to do that!