2

I am new in Auto Layout and constraints. So I applied constraints according to super view by storyboard, but facing some below warning:

"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. ( "<_UILayoutSupportConstraint:0x14dfa550 V:[_UILayoutGuide:0x14df81e0(0)]>", "<_UILayoutSupportConstraint:0x14dfa520 V:|-(0)-[_UILayoutGuide:0x14df81e0] (Names: '|':UIView:0x14ed7ff0 )>", "", "", "", "", "" )

Will attempt to recover by breaking constraint

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful. 2016-08-01 11:56:48.694 Laatli[1034:623262] 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. ( "", "", "", "", "", "", "" )

Will attempt to recover by breaking constraint

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful. 2016-08-01 11:56:48.699 Laatli[1034:623262] 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. ( "<_UILayoutSupportConstraint:0x14dfa550 V:[_UILayoutGuide:0x14df81e0(64)]>", "<_UILayoutSupportConstraint:0x14dfa520 V:|-(0)-[_UILayoutGuide:0x14df81e0] (Names: '|':UIView:0x14ed7ff0 )>", "", "", "", "", "", "" )

Will attempt to recover by breaking constraint

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in may also be helpful."

I don't know why these warnings are coming in console.

halfer
  • 19,824
  • 17
  • 99
  • 186
Kishor Pahalwani
  • 1,010
  • 1
  • 23
  • 53

2 Answers2

2

Unsatisfiable Layouts

Unsatisfiable layouts occur when the system cannot find a valid solution for the current set of constraints. Two or more required constraints conflict, because they cannot all be true at the same time.

Identifying Unsatisfiable Constraints

Often, Interface Builder can detect conflicts at design time. ON these occasions, Interface builder displays the error in a number of ways:

  • All the conflicting constraints are drawn on the canvas in red.

  • Xcode lists the conflicting constraints as warnings in the issue navigator.

  • Interface Builder displays a red disclosure arrow in the upper right corner of the document outline.

Unsatisfiable Constraints

Click the disclosure arrow to display a list of all the Auto Layout issues in the current layout.

Interface Builder can often recommend fixes for these issues. For more information, see Resolving Layout Issues for a View Controller, Window, or Root View in Auto Layout Help.

Below is the link where Apple has specified all of this. Please do read the documentation. It has most of the answers a beginner might want.

Source: Apple Documentation

halfer
  • 19,824
  • 17
  • 99
  • 186
Ariel
  • 2,471
  • 1
  • 26
  • 43
2

Explanation for this Error of console shown in xCode:-

"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. ( "<_UILayoutSupportConstraint:0x14dfa550 V:[_UILayoutGuide:0x14df81e0(0)]>", "<_UILayoutSupportConstraint:0x14dfa520 V:|-(0)-[_UILayoutGuide:0x14df81e0] (Names: '|':UIView:0x14ed7ff0 )>", "", "", "", "", "" )

It means:-

There is some extra constraints added to one view. Constraints related to vertical i.e. from Top you have given two constraints which is creating problem.

It will automatically delete any constraint to satisfy condition.

You need to delete any one constraints and apply proper valid constraint to UIView.

Zalak Patel
  • 1,937
  • 3
  • 26
  • 44