在控制台中的约束警告,我不能理解 [英] Constraints warning in console, i am not able to understand
问题描述
实际上我是新的在自动布局和约束。
所以我根据超级视图通过故事板,
应用约束,但面临一些以下警告: -
可能至少有一个
的约束在下面的列表是一个你不想要的尝试
这是:(1)看看每个约束,并尝试找出你
不期望;(2)找到添加了不需要的约束
或约束并修复它的代码(
< _UILayoutSupportConstraint:0x14dfa550 V:[_ UILayoutGuide:0x14df81e0 >,
< _UILayoutSupportConstraint:0x14dfa520 V:| - (0) - [_ UILayoutGuide:0x14df81e0](名称:'|':UIView:0x14ed7ff0
)>,
,
,
,
,
)
约束
在UIViewAlertForUnsatisfiableConstraints
处创建一个符号断点,在调试器中捕获它。在
中列出的UIView的
UIConstraintBasedLayoutDebugging类别中的方法也可能有帮助。 2016-08-01 11:56:48.694
Laatli [1034:623262]无法同时满足约束。
下面列表中的至少一个约束可能是一个
你不想要的。尝试这样:(1)查看每个约束,并尝试
计算出你不期望的; (2)找到添加了
不需要的约束或约束并修复它的代码。 (
,
,
,
,
,
,
尝试通过破坏约束恢复
在UIViewAlertForUnsatisfiableConstraints
在调试器中捕获它。在
中列出的UIView的
UIConstraintBasedLayoutDebugging类别中的方法也可能有帮助。 2016-08-01 11:56:48.699
Laatli [1034:623262]无法同时满足约束。
下面列表中的至少一个约束可能是一个
你不想要的。尝试这样:(1)查看每个约束,并尝试
计算出你不期望的; (2)找到添加了
不需要的约束或约束并修复它的代码。 (
< _UILayoutSupportConstraint:0x14dfa550V:[_UILayoutGuide:0x14df81e0(64)]>,)>,
,
,
,
,
)
将通过破坏约束尝试恢复
符号断点在UIViewAlertForUnsatisfiableConstraints
在调试器中捕获此。
中列出的UIView中的
UIConstraintBasedLayoutDebugging类别中的方法也可能有帮助。
请帮助
不满意的布局
当系统找不到当前约束集的有效解时会出现不满意的布局。两个或多个必需约束冲突,因为它们不能全部同时为真。
$ b
通常,Interface Builder可以检测设计中的冲突在这些情况下,界面构建器以多种方式显示错误:
-
所有冲突约束都在
-
Xcode将冲突约束列为问题
导航器中的警告。 - Interface Builder在文档大纲的右上角
角显示红色披露箭头。
单击公开箭头以显示当前布局中所有Auto Layout问题的列表。
Interface Builder通常会建议修复这些问题。有关详情,请参阅在。 html#// apple_ref / doc / uid / TP40014226rel =nofollow noreferrer>自动布局帮助。
下面是Apple指定的链接所有这些。请阅读文档。
资料来源: Apple文档
亲爱的,\\ b $ b Ariel
Actually i am new in Auto Layout and constraints. So i applied constraints according to super view by storyboard, but facing some below warning : -
"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. ( "<_UILayoutSupportConstraint:0x14dfa550 V:[_UILayoutGuide:0x14df81e0(0)]>", "<_UILayoutSupportConstraint:0x14dfa520 V:|-(0)-[_UILayoutGuide:0x14df81e0] (Names: '|':UIView:0x14ed7ff0 )>", "", "", "", "", "" )
Will attempt to recover by breaking constraint
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. 2016-08-01 11:56:48.694 Laatli[1034:623262] 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. ( "", "", "", "", "", "", "" )
Will attempt to recover by breaking constraint
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. 2016-08-01 11:56:48.699 Laatli[1034:623262] 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. ( "<_UILayoutSupportConstraint:0x14dfa550 V:[_UILayoutGuide:0x14df81e0(64)]>", "<_UILayoutSupportConstraint:0x14dfa520 V:|-(0)-[_UILayoutGuide:0x14df81e0] (Names: '|':UIView:0x14ed7ff0 )>", "", "", "", "", "", "" )
Will attempt to recover by breaking constraint
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."
I don't know why these warnings are coming in console. Please help
Unsatisfiable Layouts
Unsatisfiable layouts occur when the system cannot find a valid solution for the current set of constraints. Two or more required constraints conflict, because they cannot all be true at the same time.
Identifying Unsatisfiable Constraints
Often, Interface Builder can detect conflicts at design time. ON these occasions, Interface builder displays the error in a number of ways:
All the conflicting constraints are drawn on the canvas in red.
Xcode lists the conflicting constraints as warnings in the issue navigator.
- Interface Builder displays a red disclosure arrow in the upper right corner of the document outline.
Click the disclosure arrow to display a list of all the Auto Layout issues in the current layout.
Interface Builder can often recommend fixes for these issues. For more information, see Resolving Layout Issues for a View Controller, Window, or Root View in Auto Layout Help.
Below is the link where Apple has specified all of this. Please do read the documentation. It has most of the answers a beginner might want.
Source: Apple Documentation
Kind Regards,
Ariel
这篇关于在控制台中的约束警告,我不能理解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!