[转载]第十四天 闹钟《苹果iOS实例编程入门教程》

Posted on 2013-12-16 10:35  逍_遥  阅读(262)  评论(0)    收藏  举报

今天来建立一个 iPhone app 软件,其中包含闹钟的所有功能。

Xcode4.2_ios_5_sdk:本应用程序将不使用 Interface builder或storyboard

[转载]第十四天 <wbr>闹钟《苹果iOS实例编程入门教程》      [转载]第十四天 <wbr>闹钟《苹果iOS实例编程入门教程》

纲要:

UILocalNotification 定时推送

UIPickView 自定义显示

NSMutableArray 配合 UIPickView

UIPickView 循环选择

UILabel 自定义显示

UIButton 自定义显示

步骤:

1.

首先运行以安装好的 xCode

选择: File->New Project.

从 "New Project" 窗口
 
选择 : iOS ->Application -> Empty Application

命名 : 我这里命名为 “alarmClock”

                             Device Family -> iPhone

本应用程序将不使用“Core Data”、"ARC"和“Uint Tests”

[转载]第十四天 <wbr>闹钟《苹果iOS实例编程入门教程》

2.

在文件栏->右击文件夹->“New File”-> iOS -> Cocoa Touch -> UIViewController subclass

命名: mainViewController (本应用程序的制作将不使用Interface Builder)

[转载]第十四天 <wbr>闹钟《苹果iOS实例编程入门教程》

3.

双击打开AppDelegate.h文件,代码修改后如下:

[转载]第十四天 <wbr>闹钟《苹果iOS实例编程入门教程》

4.

双击打开AppDelegate.m文件,代码修改后如下:

[转载]第十四天 <wbr>闹钟《苹果iOS实例编程入门教程》

5.

双击打开mainViewController.h文件,代码修改后如下:

[转载]第十四天 <wbr>闹钟《苹果iOS实例编程入门教程》

6.

双击打开mainViewController.m文件,代码修改后如下:

[转载]第十四天 <wbr>闹钟《苹果iOS实例编程入门教程》[转载]第十四天 <wbr>闹钟《苹果iOS实例编程入门教程》[转载]第十四天 <wbr>闹钟《苹果iOS实例编程入门教程》[转载]第十四天 <wbr>闹钟《苹果iOS实例编程入门教程》

最后在 xCode 选择 Run->Save All.

微盘下载今天教程文件: Day14.zip

 

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3