zoukankan      html  css  js  c++  java
  • Xocde4与Xcode3的模板比较

     

    XCode 4.2.1 项目的模版截图:

    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 就应该从这个开始。

    只有一个页面

    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(分割模式)

    Master-Detail 模板能够创建和 Mail 相似的应用。如下,左边导航是 Master,右边每封邮件的细节是 Detail。

     

    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

    在另外两个里面,一个是建一个静态类库的工程,一个创建一个完全空的工程。因此在此不再描述。

     转自:http://www.cnblogs.com/ghj1976/archive/2012/04/11/2442569.html

    参考资料:

    Xcode 4.2 环境下Application8种可选类型分析
    http://hi.baidu.com/lee_shine/blog/item/8e2015346fa30594a61e12fc.html

    正式投入学习 > 你的第一个 iOS 应用 – 2.开始上手
    http://www.guomiicom/posts/20868

    新老版 Xcode 的区别
    http://waibo.net/2012/03/08/1181.html

    Xcode 应用程序常用模板
    http://www.cnblogs.com/zjz008/archive/2011/03/23/1992589.html

     
  • 相关阅读:
    数据持久化
    搜索样式键盘的Return按钮是否可点击
    活动指示器
    在本机上安装zabbix,来监控服务器 二
    在本机上安装zabbix,来监控服务器 一
    关于cacti的相关问题
    xp_cmdshell 的开启和关闭
    写代码创建数据库,设置位置后比对用可视化界面创建数据库的区别
    随机0~N之间的整数
    关于MD5密码破解
  • 原文地址:https://www.cnblogs.com/hvaven/p/3308365.html
Copyright © 2011-2022 走看看