Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to simultaneously satisfy constraints. Leading and Trailing constraints conflicts

Can somebody help me understand these errors and and suggest how to go about solving them?

2014-09-19 08:52:45.812 Zazzle[23292:1834589] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)

(
    "<NSLayoutConstraint:0x7c0ba1e0 H:|-(8)-[UIView:0x7c0bb900]   (Names: '|':UIView:0x7c0b6c20 )>",
    "<NSLayoutConstraint:0x7c0ba210 H:[UIView:0x7c0bb900]-(8)-|   (Names: '|':UIView:0x7c0b6c20 )>",
    "<NSLayoutConstraint:0x7c0942e0 UIView:0x7c0b6c20.left == UIView:0x7c0bbfa0.left>",
    "<NSLayoutConstraint:0x7c0c03e0 UIView:0x7c0b6c20.right == UIView:0x7c0bbfa0.right>",
    "<NSLayoutConstraint:0x7c635250 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7c0bbfa0(2)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7c0ba210 H:[UIView:0x7c0bb900]-(8)-|   (Names: '|':UIView:0x7c0b6c20 )>
like image 303
Renu Avatar asked Dec 08 '25 10:12

Renu


1 Answers

fromFollow the below steps

  1. Check the constraints of a UiObject and remove any constraints that duplicated, from size inspector of Xcode.
  2. If there is no duplication,find out exact constraint that cause the problem
  3. Try to change the priority of constraint from default required(1000) to high(750).
like image 181
Nidhin Avatar answered Dec 10 '25 00:12

Nidhin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!