我有一个视图控制器,其中几个堆栈视图彼此嵌套。故事板看起来很好,一切都很完美。但是在运行时我得到以下输出。
2016-02-15 15:08:32.330 WVSurvey[97389:14208896] 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:0x7fbb917aa030 V:|-(0)-[_UILayoutGuide:0x7fbb93901a50] (Names: '|':UIStackView:0x7fbb915bc420 )>",
"<NSLayoutConstraint:0x7fbb91488be0 'UISV-canvas-connection' V:[UIStackView:0x7fbb9390ced0]-(0)-| (Names: '|':UIStackView:0x7fbb915bc420 )>",
"<NSLayoutConstraint:0x7fbb914b2950 'UISV-spacing' V:[UIStackView:0x7fbb9390ced0]-(0)-[_UILayoutGuide:0x7fbb93901a50]>",
"<NSLayoutConstraint:0x7fbb93a2af30 'UIView-Encapsulated-Layout-Height' V:[UIStackView:0x7fbb915bc420(1024)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fbb914b2950 'UISV-spacing' V:[UIStackView:0x7fbb9390ced0]-(0)-[_UILayoutGuide:0x7fbb93901a50]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-02-15 15:08:32.330 WVSurvey[97389:14208896] 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:0x7fbb91709db0 V:[_UILayoutGuide:0x7fbb93901a50(0)]>",
"<_UILayoutSupportConstraint:0x7fbb917aa030 V:|-(0)-[_UILayoutGuide:0x7fbb93901a50] (Names: '|':UIStackView:0x7fbb915bc420 )>",
"<_UILayoutSupportConstraint:0x7fbb93912770 V:[_UILayoutGuide:0x7fbb9390c080(0)]>",
"<_UILayoutSupportConstraint:0x7fbb93912720 _UILayoutGuide:0x7fbb9390c080.bottom == UIStackView:0x7fbb915bc420.bottom>",
"<NSLayoutConstraint:0x7fbb914e6aa0 'UISV-spacing' V:[_UILayoutGuide:0x7fbb93901a50]-(0)-[_UILayoutGuide:0x7fbb9390c080]>",
"<NSLayoutConstraint:0x7fbb93a2af30 'UIView-Encapsulated-Layout-Height' V:[UIStackView:0x7fbb915bc420(1024)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fbb914e6aa0 'UISV-spacing' V:[_UILayoutGuide:0x7fbb93901a50]-(0)-[_UILayoutGuide:0x7fbb9390c080]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2016-02-15 15:08:32.331 WVSurvey[97389:14208896] 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:0x7fbb91709db0 V:[_UILayoutGuide:0x7fbb93901a50(20)]>",
"<NSLayoutConstraint:0x7fbb914e6af0 'UISV-hiding' V:[_UILayoutGuide:0x7fbb93901a50(0)]>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fbb914e6af0 'UISV-hiding' V:[_UILayoutGuide:0x7fbb93901a50(0)]>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
此外,这是故事板的样子,与运行时相比。
不应该有一堆黑色,但除了所有似乎看起来都是正确的。无法修复黑色背景。
我的问题是如果我甚至不制作它们,我如何追踪和修复冲突的约束?我甚至尝试删除所有约束,但仍然得到此输出。