Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix LayoutConstraints warning #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HuuLiang
Copy link

[LayoutConstraints] 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)
(
"<NSAutoresizingMaskLayoutConstraint:0x6000009f0b90 h=--& v=--& EmptyDataSet_Swift.EmptyDataSetView:0x7fb5aa00e600.width == 0 (active)>",
"<NSLayoutConstraint:0x6000009f0320 UIView:0x7fb5aa077fb0.centerX == EmptyDataSet_Swift.EmptyDataSetView:0x7fb5aa00e600.centerX (active)>",
"<NSLayoutConstraint:0x6000009f0370 H:|-(0)-[UIView:0x7fb5aa077fb0] (active, names: '|':EmptyDataSet_Swift.EmptyDataSetView:0x7fb5aa00e600 )>",
"<NSLayoutConstraint:0x6000009f0640 H:|-(26)-[empty set title] (active, names: empty set title:0x7fb5aa01c200, '|':UIView:0x7fb5aa077fb0 )>",
"<NSLayoutConstraint:0x6000009f0730 H:[empty set title]-(26)-| (active, names: empty set title:0x7fb5aa01c200, '|':UIView:0x7fb5aa077fb0 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x6000009f0730 H:[empty set title]-(26)-| (active, names: empty set title:0x7fb5aa01c200, '|':UIView:0x7fb5aa077fb0 )>

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

 [LayoutConstraints] 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)
(
    "<NSAutoresizingMaskLayoutConstraint:0x6000009f0b90 h=--& v=--& EmptyDataSet_Swift.EmptyDataSetView:0x7fb5aa00e600.width == 0   (active)>",
    "<NSLayoutConstraint:0x6000009f0320 UIView:0x7fb5aa077fb0.centerX == EmptyDataSet_Swift.EmptyDataSetView:0x7fb5aa00e600.centerX   (active)>",
    "<NSLayoutConstraint:0x6000009f0370 H:|-(0)-[UIView:0x7fb5aa077fb0]   (active, names: '|':EmptyDataSet_Swift.EmptyDataSetView:0x7fb5aa00e600 )>",
    "<NSLayoutConstraint:0x6000009f0640 H:|-(26)-[empty set title]   (active, names: empty set title:0x7fb5aa01c200, '|':UIView:0x7fb5aa077fb0 )>",
    "<NSLayoutConstraint:0x6000009f0730 H:[empty set title]-(26)-|   (active, names: empty set title:0x7fb5aa01c200, '|':UIView:0x7fb5aa077fb0 )>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x6000009f0730 H:[empty set title]-(26)-|   (active, names: empty set title:0x7fb5aa01c200, '|':UIView:0x7fb5aa077fb0 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant