在Xcode4.2中新建一個工程,有三個大類可選: 程序員
1.Application: 編程
在這個類別下面,你能夠看到下面8種可選類型 app
下面對這些工程一一說明: ide
1.Document-Based Application: 雲計算
工程缺省說明以下: spa
This template provides a starting point for a document-based application. It provides an interface to store documents locally or in iCloud. code
這個就是iOS新增的一個重要功能--雲計算的一個體現,你能夠建立一個基於Master-Detail Application類型的工程,不過加入了一個文檔的概念,並且這些文檔能夠無縫保存到雲端。 ip
個人試驗的結果是在當前狀況下,在虛擬機上運行程序還不能保存到雲端。 開發
2.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(分割模式)
3.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編程實現其中的功能。
4.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實現的。
5.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.
這個就是你們很熟悉的View-Based Application,沒啥好說的。
6.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編輯了。
7.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了,並且不多用到這個模板。
8.Empty Application:
工程缺省說明以下:
This template provides a starting point for any application. It provides just an application delegate and a window.
這個就是原來的Window-Based Application.
在另外兩個裏面,一個是建一個靜態類庫的工程,一個建立一個徹底空的工程。所以在此再也不描述。