2014-09-18 228 views
4

我刚将我的Xcode升级到6.0.1,我无法再编译。 Xcode的构建与下面的错误而失败:Xcode 6..0.1无法编译故事板

nwi_state: registration failed (1000000) 
2014-09-18 12:46:28.977 Interface Builder Cocoa Touch Tool[19152:359412] The view hierarchy is not prepared for the constraint: <NSLayoutConstraint:0x7fb2cb5b5800 UIImageView:0x7fb2cb5893e0.centerY == UITableViewLabel:0x7fb2cb5a8950.centerY> 
    When added to a view, the constraint's items must be descendants of that view (or the view itself). This will crash if the constraint needs to be resolved before the view hierarchy is assembled. Break on -[UIView _viewHierarchyUnpreparedForConstraint:] to debug. 
2014-09-18 12:46:28.978 Interface Builder Cocoa Touch Tool[19152:359412] *** Assertion failure in -[UITableViewCellContentView _layoutEngine_didAddLayoutConstraint:roundingAdjustment:mutuallyExclusiveConstraints:], /SourceCache/UIKit_Sim/UIKit-3318/NSLayoutConstraint_UIKitAdditions.m:558 
Command /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool failed with exit code 255 

回答

0

在此基础上记在日志中:

当添加到一个视图,约束的物品必须是视图(或视图本身)的后裔。如果在组装视图层次结构之前需要解析约束,这将会崩溃。打破 - [UIView _viewHierarchyUnpreparedForConstraint:]进行调试。

添加一个象征性的断点: - [UIView的_viewHierarchyUnpreparedForConstraint:]

你也可能只是想清除涉及该视图的约束。