IPhone 编程 XCode4.2 项目模板说明

入手了台Mac Mini 2010版,只有可怜的2G内存,因为经济问题,不敢随便升级到8G内存,只是升级到10.6.8,xcoder也只是4.2.本身手上的iphone开发书本只是基于xcoder 3.2,上面截图显示的标签与4.2大有区别,无法,只能靠百度一下。找到了一篇文章,转载一下 php

XCode 4到4.2 模块发生可一些变化,让咱们来看看是哪些:by小楠瓜饼 html

XCode 4.2.1 项目的模版截图: ios

 

Single View Application

 

This template provides a starting point for an application that uses a single view. It provides a view controller to manage the view, and a storyboard or nib file that contains the view. 程序员

最经常使用的应用模版,XCode 以前版本的 View-Based Application 跟这个最像。 编程

刚开始学习HelloWorld 就应该从这个开始。 xcode

只有一个页面 app

 

Master-Detail Application

This template provides a starting point for a master-detail application. It provides a user interface configured with a navigation controller to display a list of items and also a split view on iPad. 框架

不少有过一些开发经验的程序员会发现如今为iPhone的Navigation(导航模式)和为iPad的Split(分割模式)的工程模板没有了,其实这个地方就是这两种工程的入口,若是你选择是iPhone版的Master-Detail Application,其实际生成的就是Navigation(导航模式),若是选择iPad,则为Split(分割模式) iphone

Master-Detail 模板可以建立和 Mail 类似的应用。以下,左边导航是 Master,右边每封邮件的细节是 Detail。 ide

 

 

ios5之ipad开发之分割试图与弹出层的使用
http://dabailiang.blog.51cto.com/3498372/829542

 

OpenGL Game

This template provides a starting point for an OpenGL ES-based game. It provides a view into which you render your OpenGL ES scene, and a timer to allow you to animate the view.

这个是生成一个基于OpenGL的工程,值得说明的是,iOS已全面支持OpenGLES 2.0,而且使用shader编程实现其中的功能。

若是你要建立3D游戏或者图形,可使用这个模板。它会建立一个配置好的视图,专门用来显示GL场景,并提供了一个例子计时器能够令其演示动画。

 

Page-Based Application

This template provides a starting point for a page-based application that uses a page view controller. 

这个是iOS5引入的一个新的类,page view controller,其翻页效果是基于OpenGLES实现的。

选择“Page-based Application”项目模板就能够利用这个模板建立一种“基于页”的应用程序,

以下图,咱们能够借用它实现以下的效果:

iOS5 Page-Based Application模板拟真翻页 pdf和ePub源码问题探讨
http://www.devdiv.com/forum.php?mod=viewthread&tid=107224 

 

Tabbed Application

This template provides a starting point for an application that uses a tab bar. It provides a user interface configured with a tab bar controller, and view controllers for the tab bar items.

这个就是你们熟悉的Tab Bar Application,值得一提的就是,如今控制Tab bar内容及其相关View controller都是使用代码来实现的。Tab bar从一开始就可使用代码控制,不过大部分时候能够经过IB来定义,在XCode4.0以前和4.0中,IB在这个地方的使用方式不一样。如今终于要放弃使用IB编辑了。

Tabbed 模板可以建立一个和 iTunes 相似的应用

提供了一种特殊的控制器,会沿着屏幕底部显示一个按钮栏。这个模板适用于像iPod或者电话这样的应用程序,它们都会在底部显示一行标签,提供一系列的快捷方式。

如何建立一个Tab bar Application (xcode 4.2中或者代码的方式)
http://blog.csdn.net/nicktang/article/details/6854996

 

 

Utility Application

This template provides a starting point for a utility application that has a main view and an alternate view. For iPhone, it sets up an Info button to flip the main view to the alternate view. For iPad, it sets up an Info bar button that shows the alternate view in a popover.

这个惟一新增的就是支持iPad了,并且不多用到这个模板。

 

Xcode Utility Application 例子 数据传递与共享
http://hi.baidu.com/ghina/blog/item/d90bf8b3622d04b8d9335ae7.html

以下图,第一个页面右下角点击 i 按钮, 出现第二个页面。

 

Empty Application

This template provides a starting point for any application. It provides just an application delegate and a window.

这个就是原来的Window-Based Application.

若是其余模板都不适合你的需求,就只有用这个很是简单的模板了。它提供了一个简单的、带有一个窗口的应用程序。这是一个应用程序所需的最小框架,你能够用它做为开始来编写你本身的程序。

 

 

 

 

XCode 3 跟 XCode 4 项目模版的对应关系能够看下表:

Navigation-based Application  ——->Master-Detail Application => iphone

Splite View-based Application ——->Master-Detail Application => ipad

OpenGL ES Application —————>OpenGL Game

Tab Bar Application      —————>Tabbed Application

Utility Application         —————>Utility Application

View-based Application —————>Single View Application

Window-based Application————>Empty Application

相关文章
相关标签/搜索