简体   繁体   English

无法在Xcode 6.1中打开情节提要

[英]Can't open storyboard in Xcode 6.1

The document "MainStoryboard.storyboard" could not be opened. 无法打开文档“ MainStoryboard.storyboard”。 The operation couldn't be completed. 该操作无法完成。 (com.apple.InterfaceBuilder error -1.) (com.apple.InterfaceBuilder错误-1。)

This is the error that I see every time I click on storyboard of project. 这是我每次单击项目的故事板时看到的错误。

Had the same error when opening a storyboard in Xcode 6 for the first time. 首次在Xcode 6中打开情节提要时出现相同的错误。

One solution is to open the storyboard with your text editor of choice and manually set auto layout to false: useAutolayout="NO" . 一种解决方案是使用您选择的文本编辑器打开情节useAutolayout="NO" ,然后将自动布局手动设置为false: useAutolayout="NO" Problem with this approach is that you'll loose all of your layout constraints. 这种方法的问题是您将放宽所有布局约束。

Another option that worked well for me, was to install Xcode 5.1, open the storyboard and, in File Inspector in section Interface Builder Document , update Opens in option to use Default (5.1) , then open the storyboard again in Xcode 6. 另一个对我来说不错的选项是安装Xcode 5.1,打开情节提要,然后在Interface Builder文档部分的File Inspector中,更新Opens in选项以使用Default(5.1) ,然后在Xcode 6中再次打开情节提要。

In my case the storyboard files had .XML Extension! 就我而言,情节提要文件具有.XML扩展名! by removing .xml extension my problem was solved. 通过删除.xml扩展名,我的问题得以解决。

name should be like: 名称应类似于:

Main.storyboard

and NOT : 不是

Main.storyboard.xml

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM