Unable to simultaneously satisfy constraints – No constraints in place

Let’s look at these one by one.

"<NSAutoresizingMaskLayoutConstraint:0x84543d0 h=--& v=--& V:[UIView:0xa330270(768)]>"

This is saying view 0xa330270 (A) must be 768 points high.

"<NSLayoutConstraint:0xa338350 V:[UIView:0xa331260]-(-1)-| (Names: '|':UIView:0xa330270 )>"

This is saying view 0xa331260 (B)’s bottom edge must be a gap of -1 from the bottom of A, which is it’s superview.

"<NSLayoutConstraint:0xa338390 V:|-(841)-[UIView:0xa331260] (Names: '|':UIView:0xa330270 )>"

This is saying that B‘s top edge must be a gap of 841 points from the top of its superview, A.

These three things can’t all be true – A can’t be 768 points high, and contain a subview with a top edge 841 points inset from the top and -1 points inset from the bottom. Where have you defined each of these constraints?

You haven’t said what layout you are trying to achieve, but it looks like you might have an autoresizing mask on the superview that is preventing it changing in height when you rotate the device. As far as I know the autoresizing constraints only appear if you have added views programmatically, since a storyboard or xib is either all-autolayout, or not. Unless you are doing something like adding an auto laid out view (loaded from a nib?) to another view from a non-autolayout nib?

Leave a Comment