每次我尝试在新的 xCode 6 或 6.1 以及 Yosemite 上打开 Storyboard和 xib 文件时。当我的同事可以在 Maverick 上的 xCode 6 中打开它时,就会发生这种情况。我反复收到以下错误:
The document "MainStoryboard.storyboard" could not be opened. The operation couldn’t be completed. (com.apple.InterfaceBuilder error -1.)
我仍然可以在 Yosemite 上的 xCode 5 上打开它。我也试过这个方法:
在文本编辑器中打开 xib 文件并删除 ImageName 的所有 ImageViews 属性,其具有 .png 格式;它有助于打开其中的一些,但不是全部!
这是一个非常糟糕的情况,我被困住了!
此信息由控制台提供:
Exception raised while unarchiving document objects - -[NSTaggedPointerString getCharacters:range:]: Range {0, 10} out of bounds; string length 4
问题是什么,我该如何解决?
最佳答案
问题出在我在 UIImageViews 中使用的一些图像的名称上。
我在文本编辑器中打开 xib 文件并找到所有这些模式“X/Y.png”。 我将其替换为“Y.png”。
这解决了我的问题!
关于ios - 无法在 xCode 6 或更高版本中打开 Storyboard或 xib 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26687272/