【问题标题】:Xcode 7.2.1 keeps crashing when switching to main.storyboard切换到 main.storyboard 时,Xcode 7.2.1 不断崩溃
【发布时间】:2016-06-28 20:26:33
【问题描述】:

我可以通过手动编辑main.storyboard 文件并将useAutoLayout="YES" 更改为useAutoLayout="NO" 来阻止它在启动时崩溃,但是当我在Xcode 中打开main.storyboard 文件时,它给了我以下错误:

The document "Main.storyboard" had 4 internal inconsistencies that were found and repaired.
This may be due to an SCM operation such as merging. Please save the document to fix the inconsistencies.
This constraint is not in the referencing constraints for its first item [<Unknown ID>]: object ID K4p-Wa-FrY
This constraint's [object ID 4bY-ZD-KPO] second item is not in the document
This constraint is not in the referencing constraints for its first item [<Unknown ID>]: object ID p48-i6-mG1
This constraint is not in the referencing constraints for its first item [<Unknown ID>]: object ID f2a-1r-b55

当我点击“确定”后保存它时,Xcode 再次崩溃。

如何阻止它崩溃以便我可以编辑我的故事板?

Here's 崩溃详情,如果有帮助的话。

【问题讨论】:

  • 它们可能是由于您的 IB 中某些项目的约束设置不正确。如果您在 IB 中没有看到任何错误提示,请尝试从每个视图中删除所有约束,直到错误消失。

标签: ios xcode storyboard xcode7.2


【解决方案1】:

我想通了。我不得不用文本编辑器打开main.storyboard 文件,并删除所有包含Xcode 大喊大叫的对象ID 的行。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-05-15
    • 1970-01-01
    • 1970-01-01
    • 2016-10-20
    • 2015-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多