第一个iPHONE应用

1.       开发工具

在本应用中,开发工具为苹果的Xcode4.2

To create the iOS application in this tutorial, you need Xcode 4.2. Xcode is Apple’s integrated development environment (or IDE) for both iOS and Mac OS X development. When you install Xcode on your Mac, you also get the iOS SDK, which includes the programming interfaces of the iOS platform.

If you don’t have Xcode installed on your Mac, visit the iOS Dev Center and download the Xcode 4.2 developer toolset (which includes the iOS 5 SDK). Double-click the package and follow the installer instructions.

To benefit from this tutorial, you must already have some familiarity with the basics of computer programming in general and with the Objective-C language in particular. If you haven t used Objective-C before, read Learning

Objective-C: A Primer before you begin this tutorial.

2.       应用

模板

根据开发工具的模板 基于视图的应用 创建一个hello world应用程序。

 

运行机制

 

程序执行 - 》调用 main.m 函数 - 》分配内存池 - 》调用 UIApplicationMain 函数

(这个函数 ,创建应用实例 (UIApplication) 和应用委托实 (HelloWorldAppDelegate) ,还扫描了配置文件 info.plist -

1 、加载 main storyboad 文件;

2 、从应用委托中得到 window 对象,或者说创建一个 UIWindow 实例,使之与应用委托协调;

3 、实例化 storyboard 的初始视图控制器,分配它作为 window 对象的根视图控制器 (root view controller)

之后, 发送 给应用 委托一 ”application:didFinishLaunchingWithOptions:”, 这个消息给委托一个机会,在应用显示出来之前去做其他工作,如附加的配置。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值