什么是" UIView-Encapsulated-Layout - *"限制?如何摆脱它们?

时间:2014-10-20 10:52:14

标签: ios objective-c autolayout

尝试获取横向方向时出现布局错误。布局就破了。

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:0x78fc49c0 H:[UILayoutContainerView:0x78e536e0(320)]>",
    "<NSLayoutConstraint:0x799cf0e0 'UIView-Encapsulated-Layout-Width' H:[UILayoutContainerView:0x78e536e0(568)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x799cf0e0 'UIView-Encapsulated-Layout-Width' H:[UILayoutContainerView:0x78e536e0(568)]>

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.

垂直约束也有类似的错误。 我没有创建那些约束。没有UITabBar对象。我不知道哪些其他对象会产生这样的约束。

0 个答案:

没有答案