打开特定的XIB文件时Xcode崩溃

时间:2013-07-16 07:31:22

标签: objective-c xcode crash xib

我有一个XIB文件工作正常,直到今天 - 当我尝试在Xcode中打开它时,沙滩球出现并在1分钟后Xcode崩溃。其他XIBs工作正常。此外,如果我只是构建并运行项目直接到我的设备,它也工作(和XIB在应用程序工作)。

以下是错误消息:

Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
ProductBuildVersion: 4G1004
ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-1929/IBPlugin/Utilities/IBObjectMarshalling.m:651
Details:  Failed to arbitrate IBNSLayoutConstraint, IBUIButton, IBUIImageView, IBUILabel, IBUITextField, and IBUIView.

Interface Builder encountered an error communicating with the iOS Simulator. If you choose to file a crash report or radar for this issue, please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" and include their content in your crash report.

Exception name: NSInternalInconsistencyException

我会感激任何想法和想法!

2 个答案:

答案 0 :(得分:11)

如果单击xib文件后Xcode崩溃,您将无法取消选中使用AutoLayout 。以下是改变它的方法:

  1. 右键单击Project Navigator中的.xib文件
  2. 选择打开方式... > 源代码
  3. 在最后找到这一行:<bool key="IBDocument.UseAutolayout">YES</bool>
  4. YES更改为NO
  5. 保存文件
  6. 在Project Navigator中再次右键单击.xib文件
  7. 选择打开方式... &gt; 界面生成器 - iOS

答案 1 :(得分:0)

您使用的是autoLayout属性吗?取消选中使用自动布局的复选框,它应该可以正常工作。取消选中此项然后保存文件似乎可以解决我之前的问题。请查看此链接以获取更多详细信息Xcode Interface Builder crashes when I edit storyboard

相关问题