故事板是否替换 Xcode 4.2 中的 .xib 文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8196480/
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-14 22:29:22  来源:igfitidea点击:

Does storyboard replace .xib file in Xcode 4.2

xcode

提问by pdenlinger

Have started playing with Xcode 4.2, and created a single page application using storyboard and ARC. When I opened up the file, there are five files: AppDelegate .h and .m and ViewController .h, .m and storyboard.

已开始使用 Xcode 4.2,并使用故事板和 ARC 创建了一个单页应用程序。当我打开文件时,有五个文件:AppDelegate .h 和 .m 以及 ViewController .h、.m 和 storyboard。

No .xib file.

没有 .xib 文件。

Is this normal? Or do I need to do something to generate a .xib file?

这是正常的吗?或者我需要做些什么来生成 .xib 文件?

Thank you.

谢谢你。

回答by NJones

This is normal. Storyboards eliminate the need for seperate .xibs. Be advised that using storyboards means you can NOT target devices running any iOS below 5.0. If this is important to you, like it is to me, then create your projects with the 'Use Storyboard' unchecked.

这是正常的。故事板消除了对单独.xibs. 请注意,使用故事板意味着您不能定位运行任何低于 5.0 的 iOS 的设备。如果这对您很重要,就像对我一样,那么在未选中“使用故事板”的情况下创建您的项目。

Uncheck "Use Storyboard" when creating a project

创建项目时取消选中“使用故事板”