【发布时间】:2017-03-27 19:50:18
【问题描述】:
我最近遇到了一些与 AutoLayout 相关的问题,但无法确定哪些约束有问题 - 日志如下所示:
[Layout] Unable to simultaneously satisfy constraints:
<private>
Will attempt to recover by breaking constraint
<private>
Set the NSUserDefault NSConstraintBasedLayoutVisualizeMutuallyExclusiveConstraints to YES to have -[NSWindow visualizeConstraints:] automatically called when this happens. And/or, set a symbolic breakpoint on LAYOUT_CONSTRAINTS_NOT_SATISFIABLE to catch this in the debugger.
我确实尝试在 LAYOUT_CONSTRAINTS_NOT_SATISFIABLE 设置断点并尝试查看是否可以,但在那里也失败了:
(lldb) p $arg1
(unsigned long) $0 = 4330017792
当我们看到其他所有约束时,如何正常记录这些约束?
查看一些问题/论坛后,我了解到 Apple 引入了“统一日志记录系统”,将一些日志设为私有,而不会将个人数据强加给任何人。 (我想知道什么样的个人数据会在日志记录约束中泄露?)
我确实看过this question,但也没有为我工作。
【问题讨论】:
标签: xcode logging autolayout