iOS 10: NSInvalidLayoutConstraintException: Constraint improperly relates anchors of incompatible types
You perhaps are doing something like this:
NSLayoutConstraint(item: viewA, attribute:
.leading , relatedBy: .equal, toItem: parentView, attribute: .top, multiplier: 1.0, constant: 20)
So you do not stitch the correct anchors together like .leading
and .top
. In this case it must be .leading
and .leading
.
Interestingly this wasn't a problem with iOS9.