IOS 10: NSInvalidLayoutConstraintException: constraint improperly binds incompatible type bindings

After upgrading to iOS 10 Im, getting this error, a bunch of one of my apps

NSInvalidLayoutConstraintException: The constraint improperly binds anchors of incompatible types:

<NSLayoutConstraint:0x170495270 UIView:0x1010e1d90.top == AppName.OtherView:0x1010dc6f0.centerX (active)>

I have never had a problem using this restriction before, and I only get it on my iOS 10 devices. Any ideas?

+4
source share
1 answer

Perhaps you 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 correct the anchor stitch together as .leadingand .top. In this case, it should be .leadingand .leading.

, iOS9.

+10

Source: https://habr.com/ru/post/1654812/


All Articles