关闭:"无法同时满足约束条件"

时间:2018-02-06 22:45:00

标签: ios ios-autolayout

如何关闭此约束冲突记录?

最终,我将回到修复项目中的约束。与此同时,由于垃圾邮件的所有废话,我无法阅读我的控制台。

我正在谈论:

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x60c00029b120 UIView:0x7fc03fd87c90.centerY == UITableViewCellContentView:0x7fc03fd852a0.centerY   (active)>

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.
2018-02-06 16:39:34.094262-0600 Project[12092:1055478] [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. 
(
    "<NSLayoutConstraint:0x60c00029b940 UIView:0x7fc03fd8af60.width == 1   (active)>",
    "<NSLayoutConstraint:0x60c00029bad0 UIView:0x7fc03fd8b140.width == 1   (active)>",
    "<NSLayoutConstraint:0x60c00009e870 UITextField:0x7fc040949600.width == 99   (active)>",
    "<NSLayoutConstraint:0x60c00029bd00 H:|-(114.5)-[UIView:0x7fc03fd8b140]   (active, names: '|':UIView:0x7fc03fd8ad80 )>",
    "<NSLayoutConstraint:0x60c00029bdf0 H:[UIView:0x7fc03fd8b140]-(7.5)-[UITextField:0x7fc040949600]   (active)>",
    "<NSLayoutConstraint:0x60c00029be90 H:[UITextField:0x7fc040949600]-(6.5)-[UIView:0x7fc03fd8af60]   (active)>",
    "<NSLayoutConstraint:0x60c00029bee0 H:[UIView:0x7fc03fd8af60]-(113.5)-|   (active, names: '|':UIView:0x7fc03fd8ad80 )>",
    "<NSLayoutConstraint:0x60c00029c0c0 H:[UIView:0x7fc03fd8ad80]-(16)-|   (active, names: '|':UITableViewCellContentView:0x7fc03fd891d0 )>",
    "<NSLayoutConstraint:0x60c00029c110 UIView:0x7fc03fd8ad80.centerX == UITableViewCellContentView:0x7fc03fd891d0.centerX   (active)>",
    "<NSLayoutConstraint:0x60400028c530 'UIView-Encapsulated-Layout-Width' UITableViewCellContentView:0x7fc03fd891d0.width == 414   (active)>"
)

我办公桌上的MacPro没有这个问题但我的笔记本电脑确实存在问题。必须有办法让它停止。我保证有一天我会解决这些限制。请帮忙。谢谢。

1 个答案:

答案 0 :(得分:0)

我有一段时间没试过,但过去常常有用:

UserDefaults.standard.setValue(false, forKey:"_UIConstraintBasedLayoutLogUnsatisfiable")