没有合适的资源?快使用搜索试试~ 我知道了~
首页首个iPhone应用程序教程:探索iPhone101
首个iPhone应用程序教程:探索iPhone101
需积分: 0 1 下载量 97 浏览量
更新于2024-08-01
收藏 1.72MB PDF 举报
"《第一个iPhone程序:iPhone101》是一份由Apple Inc.在2010年3月15日发布的指南,专为iOS开发者设计。这份文档详细介绍了如何开发在早期iPhone上运行的应用程序,标志着苹果手机平台的编程入门里程碑。文档强调了版权和许可的重要性和限制,所有内容受Apple的严格保护。 首先,它提供了开发者的通用指南,让读者了解当时iPhone操作系统(iPhone OS)的基础架构和最佳实践。开发者被授权仅将文档存储在个人电脑上供个人参考,并可以打印文档供个人学习使用,但必须保留Apple的版权声明,不得进行任何形式的复制或传播,除非获得书面许可。 苹果对其标志,如Apple logo(Option-Shift-K)的使用有着严格的管理,商业用途需事先征得苹果的书面同意,以防止商标侵权和不公平竞争,这反映了苹果对品牌形象的保护和知识产权的战略。 此外,文档明确指出,这份技术描述并未授予任何许可,意味着开发者只能根据文档内容进行学习,而不具备将其技术用于商业目的的权利。所有的技术知识和知识产权归苹果所有,其目的是为了帮助应用程序开发者理解和开发出符合苹果平台标准的应用。 通过这份文档,开发者可以了解到早期iPhone应用开发的基本流程、界面设计原则、API使用方法以及如何遵循苹果的审核政策,这对于理解iOS生态系统的演变和发展历程具有重要意义。随着时代的变迁,这份文档虽然可能不再适用于最新的iPhone版本,但它代表了一个时代的开端,见证了移动应用开发的黄金时期。"
资源详情
资源推荐
In this tutorial, little regard is given to the user interface. Presentation is, however, a critical component of a
successful iPhone OS application. You should read the iPhone Human Interface Guidelines and explore the
sample code based on this tutorial (HelloWorld) to understand how the user interface might be improved
for a full-fledged application.
You’ll also start to gain an understanding of how view controllers work and how they fit into the architecture
of an iPhone OS application.
Design Patterns
If you haven’t already, you should make sure you read the design patterns chapter in Cocoa Fundamentals
Guide, however the main patterns you’re going to use are:
■ Delegation
■ Model View Controller
■ Target-Action
Here’s a quick summary of these patterns and an indication of where they’ll be used in the application.
Delegation
Delegation is a pattern where one object periodically sends messages to another object specified as its
delegate to ask for input or to notify the delegate that an event is occurring. You use it as an alternative to
class inheritance for extending the functionality of reusable objects.
In this application, the application object tells its delegate that the main start-up routines have finished and
that the custom configuration can begin. For this application, you want the delegate to create an instance
of a controller to set up and manage the view. In addition, the text field will tell its delegate (which in this
case will be the same controller) when the user has tapped the Return key.
Delegate methods are typically grouped together into a protocol. A protocol is basically just a list of methods.
If a class conforms to a protocol, it guarantees that it implements the required methods of a protocol.
(Protocols may also include optional methods.) The delegate protocol specifies all the messages an object
might send to its delegate. To learn more about protocols and the role they play in Objective-C, see the
“Protocols” chapter in The Objective-C Programming Language.
Model-View-Controller
The Model-View-Controller (or “MVC”) design pattern sets out three roles for objects in an application.
Model objects represent data such as SpaceShips and Rockets in a game, ToDo items and Contacts in a
productivity application, or Circles and Squares in a drawing application.
In this application, the model is very simple—just a string—and it’s not actually used outside of a single
method, so strictly speaking it’s not even necessary. It’s the principle that’s important here, though. In other
applications the model will be more complicated and accessed from a variety of locations.
10
Design Patterns
2010-03-15 | © 2010 Apple Inc. All Rights Reserved.
CHAPTER 1
Tutorial Overview and Design Patterns
View objects know how to display data (model objects) and may allow the user to edit the data.
In this application, you need a main view to contain several other views—a text field to capture information
from the user, a second text field to display text based on the user’s input, and a button to let the user tell
us that the secondary text should be updated.
Controller objects mediate between models and views.
In this application, the controller object takes the data from the input text field, stores it in a string, and
updates a second text field appropriately. The update is initiated as a result of an action sent by the button.
Target-Action
The target-action mechanism enables a view object that presents a control—that is, an object such as a
button or slider—in response to a user event (such as a click or a tap) to send a message (the action) to
another object (the target) that can interpret the message and handle it as an application-specific instruction.
In this application, when it’s tapped, the button tells the controller to update its model and view based on
the user’s input.
Design Patterns 11
2010-03-15 | © 2010 Apple Inc. All Rights Reserved.
CHAPTER 1
Tutorial Overview and Design Patterns
剩余53页未读,继续阅读
fraglib
- 粉丝: 4
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 构建Cadence PSpice仿真模型库教程
- VMware 10.0安装指南:步骤详解与网络、文件共享解决方案
- 中国互联网20周年必读:影响行业的100本经典书籍
- SQL Server 2000 Analysis Services的经典MDX查询示例
- VC6.0 MFC操作Excel教程:亲测Win7下的应用与保存技巧
- 使用Python NetworkX处理网络图
- 科技驱动:计算机控制技术的革新与应用
- MF-1型机器人硬件与robobasic编程详解
- ADC性能指标解析:超越位数、SNR和谐波
- 通用示波器改造为逻辑分析仪:0-1字符显示与电路设计
- C++实现TCP控制台客户端
- SOA架构下ESB在卷烟厂的信息整合与决策支持
- 三维人脸识别:技术进展与应用解析
- 单张人脸图像的眼镜边框自动去除方法
- C语言绘制图形:余弦曲线与正弦函数示例
- Matlab 文件操作入门:fopen、fclose、fprintf、fscanf 等函数使用详解
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功