替换 Xcode 4.2 中基于导航的应用程序模板?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8196123/
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
Replacement for Navigation-based application template in Xcode 4.2?
提问by pdenlinger
Xcode 4.2 no longer has the Navigation-based Application template.
Xcode 4.2 不再具有基于导航的应用程序模板。
What should I use in replacement when starting a project?
开始项目时我应该用什么来代替?
回答by maggix
to get a Table View and a Detail View you should go with the Master-detail template. Although at first you may think about it being iPad-only, the iPhone version builds an application which is similar to the Navigation-based.
要获得表视图和详细视图,您应该使用主从模板。虽然一开始您可能会认为它仅适用于 iPad,但 iPhone 版本构建了一个类似于基于导航的应用程序。
回答by Jason Lu
I don't think that it works. Anyway, you should start with a single view application, then add the files from the New-File menu. You should select View. Then click create. It should generate the required files for you.
我不认为它有效。无论如何,您应该从单个视图应用程序开始,然后从 New-File 菜单添加文件。您应该选择查看。然后点击创建。它应该为您生成所需的文件。
回答by Mxnuel Salinas
In Xcode 4.2 you have to use SIngle-View Application Template. it's the same than Navigation-based Application template.
在 Xcode 4.2 中,您必须使用单视图应用程序模板。它与基于导航的应用程序模板相同。
回答by iveytron
The Single View Application does not set up the nav controller for you either. You have to build it manually.
单一视图应用程序也不会为您设置导航控制器。您必须手动构建它。
What I suggest doing, if you can, load an older version of Xcode and create a blank Navigation-Based app. Use it as a reference for your new apps. You'll have to change your class and file names, of course, but I dont see any issue with doing it that way.
如果可以,我建议您加载旧版本的 Xcode 并创建一个空白的基于导航的应用程序。将其用作新应用程序的参考。当然,您必须更改类名和文件名,但我认为这样做没有任何问题。