首页 > ios > Debug for UIViewAlertForUnsatisfiableConstraints

Debug for UIViewAlertForUnsatisfiableConstraints

在写storyboard的时候,发现有时候终端会打印这些警告。
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)

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

解决办法:
You’ll want to add a Symbolic Breakpoint. Apple provides an excellent guide on how to do this.
1.Open the Breakpoint Navigator cmd+7
2.Click the Add button in the lower left
3.Select Add Symbolic Breakpoint…
4.Where it says Symbol just type in UIViewAlertForUnsatisfiableConstraints
You can also treat it like any other breakpoint, turning it on and off, adding actions, or log messages.

中文翻译:
1.cmd+7来到断点列表。
2.左下角有一个加号,选择 Add Symbolic Breakpoint 选项。
Add Symbolic Breakpoint
3.在Symbol里面填入 UIViewAlertForUnsatisfiableConstraints 。
UIViewAlertForUnsatisfiableConstraints
现在已经OK啦。

  1. 还没有评论
评论提交中, 请稍候...

留言


可以使用的标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Trackbacks & Pingbacks ( 0 )
  1. 还没有 trackbacks