简体   繁体   English

在xcode中创建项目后,可以更改模板吗?

[英]Can I change the template after creation of project in xcode?

I am creating an iOS article reading application which contain multiple headings,images and multiline text using platform Xcode(5.1) and chose template Empty application. 我正在使用平台Xcode(5.1)创建一个包含多个标题,图像和多行文本的iOS文章阅读应用程序,并选择了模板空应用程序。 I'm in the middle of project to complete. 我正在完成项目。 Now , Is it possible to change Empty application to Master Detail application. 现在,是否可以将Empty应用程序更改为Master Detail应用程序。

No, you cannot change the template after creation of project in xcode. 不,您无法在xcode中创建项目后更改模板。 The only thing you have to change before the creation of project. 在创建项目之前,您唯一需要更改的内容。

The template does not restrict what can and can't be done in your app. 该模板没有限制您的应用程序可以做什么和不能做什么。 It just sets out a boilerplate set up of your initial app. 它只是列出了初始应用程序的样板设置。

"Changing the template" makes no sense. “更改模板”没有任何意义。

The master detail template just uses a uinavigationcontroller as the main navigation. 主详细信息模板仅使用uinavigationcontroller作为主要导航。 You can just add this to your storyboard. 您可以将其添加到情节提要中。

I'm in the middle of project to complete. 我正在完成项目。 Now , Is it possible to change Empty application to Master Detail application 现在,是否可以将Empty应用程序更改为Master Detail应用程序

You can achieve the Master Detail application template dynamically/while running your app using UISplitViewController . 您可以动态地/在使用UISplitViewController运行应用程序时获得Master Detail应用程序模板。

The UISplitViewController class is a container view controller that manages the presentation of two side-by-side view controllers. UISplitViewController类是一个容器视图控制器,它管理两个并排视图控制器的表示。 You use this class to implement a master-detail interface, in which the left-side view controller presents a list of items and the right-side presents details of the selected item. 您可以使用此类来实现主从界面,其中左侧视图控制器显示项目列表,右侧显示所选项目的详细信息。 Split view controllers are for use exclusively on iPad devices. 分割视图控制器仅在iPad设备上使用。 Attempting to create one on other devices results in an exception. 尝试在其他设备上创建一个会导致异常。

By default, the split view controller displays both of its view controllers when in a landscape orientation. 默认情况下,拆分视图控制器在横向时显示其两个视图控制器。 However, in a portrait orientation, the split view controller displays only the detail view controller by default. 但是,在纵向方向上,默认情况下,分割视图控制器仅显示详细视图控制器。

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

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