我的控制台中有哪些警告?

时间:2015-03-24 07:31:29

标签: ios swift uiviewcontroller

我的控制台出现以下错误。我不知道它们是什么。

2015-03-24 13:57:43.213 automobile[5454:530574] 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) 
(
    "<NSLayoutConstraint:0x174284880 V:[_UILayoutGuide:0x1741b8e20]-(238)-[UIButton:0x12ee424c0'Retry']>",
    "<NSLayoutConstraint:0x174284740 V:[UIButton:0x12ee424c0'Retry']-(236)-[_UILayoutGuide:0x1741b8f00]>",
    "<_UILayoutSupportConstraint:0x1740aeb80 V:[_UILayoutGuide:0x1741b8e20(50.66)]>",
    "<_UILayoutSupportConstraint:0x1740aebe0 V:|-(0)-[_UILayoutGuide:0x1741b8e20]   (Names: '|':UIView:0x174185bd0 )>",
    "<_UILayoutSupportConstraint:0x1740aee80 V:[_UILayoutGuide:0x1741b8f00(0)]>",
    "<_UILayoutSupportConstraint:0x1740aee20 _UILayoutGuide:0x1741b8f00.bottom == UIView:0x174185bd0.bottom>",
    "<NSLayoutConstraint:0x174289d30 'UIView-Encapsulated-Layout-Height' V:[UIView:0x174185bd0(375)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x174284880 V:[_UILayoutGuide:0x1741b8e20]-(238)-[UIButton:0x12ee424c0'Retry']>

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.

任何知道这个的人?有什么帮助?

1 个答案:

答案 0 :(得分:0)

您的观点似乎存在冲突的约束。 如果您正在使用Interface Builder,我建议您单击VC场景中的红色或黄色箭头,Xcode应该为您提供有关导致问题的约束的更多详细信息。 您可以在此处看到http://i.stack.imgur.com/5lbp8.png和此处http://i.stack.imgur.com/qjvFL.png这应该如何显示在Xcode中。

我建议您首先重新考虑约束,并尽量保持满足您布局的最小值。

我希望这会有所帮助