0

Here is an error from my console concerning my auto layouts of some view components I have a view, with two subviews, a swipe view and an SMPageControl view.

Here are the constraint errors when I try to run the the app, still trying to understand autolayouts:

   "<NSLayoutConstraint:0x814c820 V:|-(385)-[SMPageControl:0x81485b0]   (Names: '|':UIView:0x8144be0 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x8152c60 h=--& v=--& V:[UIView:0x8144be0(460)]>",
    "<NSLayoutConstraint:0x814a830 V:[SMPageControl:0x81485b0]-(>=116)-|   (Names: '|':UIView:0x8144be0 )>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x814a830 V:[SMPageControl:0x81485b0]-(>=116)-|   (Names: '|':UIView:0x8144be0 )>

Break on objc_exception_throw to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

---Thanks for any help!

1 Answer 1

0

These errors are raised when one or more of the constraints you've set up in interface builder conflict. i.e., you cannot do one without violating the other.

Best way to fix it is to remove them one by one until the errors stop, then you can isolate which constraint is causing the issue. Once you've done that, hopefully you can diagnose why the constraint is being violated.

1
  • Thank you for responding. I understand that but often these constraints are auto imposed by IB. Perhaps SMPageControl is not configured to autoLayout. Commented Jun 14, 2013 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.