不可取消的不可满足的限制

时间:2016-04-17 18:43:30

标签: ios nslayoutconstraint

在主视图中执行我的项目而没有引用实际存在的对象时,我得到了这个惊人数量的破坏约束 - 视图中的所有对象都被命名,而这里的错误是指泛型对象 - 并且没有在项目的任何文件中找到的中断值。视图的可视化不受影响,但我更愿意在没有任何破坏约束的情况下提交应用程序。

2016-04-17 20:31:24.431 iPuja[2460:1299842] 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. 
(
    "<NSLayoutConstraint:0x154653250 H:[UILabel:0x154656480'0'(26)]>",
    "<NSLayoutConstraint:0x15465f6e0 H:[UILabel:0x154656480'0']-(22)-[UIImageView:0x15465bf90]>",
    "<NSLayoutConstraint:0x15465f730 UIImageView:0x15465bf90.centerX == UIView:0x15465cef0.centerX>",
    "<NSLayoutConstraint:0x15465fc80 UILabel:0x154656480'0'.leading == UIView:0x15465cef0.leadingMargin + 2>",
    "<NSLayoutConstraint:0x15465feb0 H:[UIImageView:0x15465bf90(240)]>",
    "<NSLayoutConstraint:0x1545b11f0 'UIView-Encapsulated-Layout-Width' H:[UIView:0x15465cef0(375)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x15465feb0 H:[UIImageView:0x15465bf90(240)]>

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-04-17 20:31:24.433 iPuja[2460:1299842] 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. 
(
    "<NSLayoutConstraint:0x154653250 H:[UILabel:0x154656480'0'(26)]>",
    "<NSLayoutConstraint:0x15465f6e0 H:[UILabel:0x154656480'0']-(22)-[UIImageView:0x15465bf90]>",
    "<NSLayoutConstraint:0x15465f730 UIImageView:0x15465bf90.centerX == UIView:0x15465cef0.centerX>",
    "<NSLayoutConstraint:0x15465fc80 UILabel:0x154656480'0'.leading == UIView:0x15465cef0.leadingMargin + 2>",
    "<NSLayoutConstraint:0x15465fe60 H:[UIImageView:0x15465bf90(360)]>",
    "<NSLayoutConstraint:0x1545b11f0 'UIView-Encapsulated-Layout-Width' H:[UIView:0x15465cef0(375)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x15465fe60 H:[UIImageView:0x15465bf90(360)]>

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-04-17 20:31:24.434 iPuja[2460:1299842] 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. 
(
    "<NSLayoutConstraint:0x15465ff00 V:[UIImageView:0x15465bf90(70)]>",
    "<NSLayoutConstraint:0x15465ff50 V:[UIImageView:0x15465bf90(73)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x15465ff50 V:[UIImageView:0x15465bf90(73)]>

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-04-17 20:31:24.434 iPuja[2460:1299842] 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. 
(
    "<NSLayoutConstraint:0x15465f690 UIView:0x15465cef0.bottomMargin == UIImageView:0x15465bf90.bottom>",
    "<NSLayoutConstraint:0x15465f780 UIView:0x15465cef0.bottomMargin == UIImageView:0x15465bf90.bottom + 2>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x15465f780 UIView:0x15465cef0.bottomMargin == UIImageView:0x15465bf90.bottom + 2>

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.

当然,故事板中没有报告错误。

0 个答案:

没有答案