xcode 为什么我只能查看 Storyboard 的源代码而不能查看 Interface Builder?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10386512/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 00:08:30  来源:igfitidea点击:

Why can I only view Storyboard's source and not Interface Builder?

xcodeios5storyboarduistoryboard

提问by Jupiter869

I was using Xcode and making changes to my storyboard... no problem. Now, I get the source code for the storyboard but not the storyboard images!

我正在使用 Xcode 并对我的故事板进行更改......没问题。现在,我得到了故事板的源代码,但没有得到故事板图像!

When I right click on the storyboard file, I don't see "Interface Builder - IOS Storyboard" as an option.

当我右键单击故事板文件时,我没有看到“Interface Builder - IOS Storyboard”作为选项。

Anyone have this happen to them?

有没有人遇到过这种情况?

回答by peketamin

see: XCode 4.2 Version Inspector Hides Storyboard

请参阅:XCode 4.2 版本检查器隐藏故事板

When I right click on the storyboard file, I don't see "Interface Builder - IOS Storyboard" as an option.

当我右键单击故事板文件时,我没有看到“Interface Builder - IOS Storyboard”作为选项。

Open As> InterfaceBuilder - IOS Storyboard

打开为> InterfaceBuilder - IOS Storyboard

probably you opened the file as source code...

可能您将文件作为源代码打开...

回答by piperchester

What's always worked for me when Open As -> Interface Builder - iOS Storyboardisn't an option is to:

Open As -> Interface Builder - iOS Storyboard不是一种选择时,对我来说总是有效的方法是:

  1. Close Xcode
  2. Reopen
  1. 关闭 Xcode
  2. 重新开放

Sometimes this happens when you have:

有时,当您有以下情况时会发生这种情况:

  • Just resolved a merge conflict
  • Split into diff view to compare previous and current commits
  • 刚刚解决了合并冲突
  • 拆分为差异视图以比较以前和当前的提交