没有合适的资源?快使用搜索试试~ 我知道了~
iPad Programming Guide
4星 · 超过85%的资源 需积分: 3 96 下载量 106 浏览量
2010-07-10
22:22:13
上传
评论
收藏 2.02MB PDF 举报
温馨提示
试读
92页
现在,iPad已经成为世界的热门产品,由其引起的话题更是日益增多。 你想对iPad进行编程,成为其主宰吗?你想通过对iPad的编程获取利润吗?下载iPad 编程权威指南,让你梦想成真!
资源推荐
资源详情
资源评论
iPad Programming Guide
General
2010-03-24
Apple Inc.
© 2010 Apple Inc.
All rights reserved.
No part of this publication may be reproduced,
stored in a retrieval system, or transmitted, in
any form or by any means, mechanical,
electronic, photocopying, recording, or
otherwise, without prior written permission of
Apple Inc., with the following exceptions: Any
person is hereby authorized to store
documentation on a single computer for
personal use only and to print copies of
documentation for personal use provided that
the documentation contains Apple’s copyright
notice.
The Apple logo is a trademark of Apple Inc.
Use of the “keyboard” Apple logo
(Option-Shift-K) for commercial purposes
without the prior written consent of Apple may
constitute trademark infringement and unfair
competition in violation of federal and state
laws.
No licenses, express or implied, are granted
with respect to any of the technology described
in this document. Apple retains all intellectual
property rights associated with the technology
described in this document. This document is
intended to assist application developers to
develop applications only for Apple-labeled
computers.
Every effort has been made to ensure that the
information in this document is accurate. Apple
is not responsible for typographical errors.
Apple Inc.
1 Infinite Loop
Cupertino, CA 95014
408-996-1010
Apple, the Apple logo, Cocoa, iPod, iPod touch,
Mac, Mac OS, Objective-C, Pages, Quartz, and
Xcode are trademarks of Apple Inc., registered
in the United States and other countries.
Cocoa Touch, iPhone, and Multi-Touch are
trademarks of Apple Inc.
OpenGL is a registered trademark of Silicon
Graphics, Inc.
Simultaneously published in the United States
and Canada.
Even though Apple has reviewed this document,
APPLE MAKES NO WARRANTY OR REPRESENTATION,
EITHER EXPRESS OR IMPLIED, WITH RESPECT TO
THIS DOCUMENT, ITS QUALITY, ACCURACY,
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR
PURPOSE. AS A RESULT, THIS DOCUMENT IS
PROVIDED “AS IS,” AND YOU, THE READER, ARE
ASSUMING THE ENTIRE RISK AS TO ITS QUALITY
AND ACCURACY.
IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT,
INDIRECT, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES RESULTING FROM ANY
DEFECT OR INACCURACY IN THIS DOCUMENT, even
if advised of the possibility of such damages.
THE WARRANTY AND REMEDIES SET FORTH ABOVE
ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL
OR WRITTEN, EXPRESS OR IMPLIED. No Apple
dealer, agent, or employee is authorized to make
any modification, extension, or addition to this
warranty.
Some states do not allow the exclusion or limitation
of implied warranties or liability for incidental or
consequential damages, so the above limitation or
exclusion may not apply to you. This warranty gives
you specific legal rights, and you may also have
other rights which vary from state to state.
Contents
Introduction
Introduction 9
Prerequisites 9
Organization of This Document 9
See Also 10
Chapter 1
About iPad Development 11
What is iPad All About? 11
Development Fundamentals 11
Core Architecture 11
View Controllers 12
Graphics and Multimedia 13
Event Handling 13
Device Integration Support 13
What’s New for iPad Devices? 14
More Room for Your Stuff 14
New Elements to Distinguish Your User Interface 14
Enhanced Support for Text Input and Display 15
Support for External Displays and Projectors 16
Formalized Support for Handling Documents and Files 17
PDF Generation 17
Chapter 2
Starting Your Project 19
Creating a Universal Application 19
Configuring Your Xcode Project 19
Updating Your Info.plist Settings 20
Updating Your Views and View Controllers 21
Adding Runtime Checks for Newer Symbols 21
Using Runtime Checks to Create Conditional Code Paths 22
Updating Your Resource Files 22
Using a Single Xcode Project to Build Two Applications 23
Starting from Scratch 24
Important Porting Tip for Using the Media Player Framework 24
Chapter 3
The Core Application Design 27
iPad Application Architecture 27
The Application Bundle 29
New Keys for the Application’s Info.plist File 29
Providing Launch Images for Different Orientations 30
3
2010-03-24 | © 2010 Apple Inc. All Rights Reserved.
Document Support on iPad Devices 32
Previewing and Opening Files 32
Registering the File Types Your Application Supports 34
Opening Supported File Types 35
Chapter 4
Views and View Controllers 37
Designing for Multiple Orientations 37
Creating a Split View Interface 38
Adding a Split View Controller in Interface Builder 40
Creating a Split View Controller Programmatically 40
Supporting Orientation Changes in a Split View 41
Using Popovers to Display Content 41
Creating and Presenting a Popover 44
Implementing a Popover Delegate 45
Tips for Managing Popovers in Your Application 45
Configuring the Presentation Style for Modal Views 46
Making Better Use of Toolbars 48
Chapter 5
Gesture Recognizers 49
Gesture Recognizers Simplify Event Handling 49
Recognized Gestures 49
Gestures Recognizers Are Attached to a View 50
Gestures Trigger Action Messages 51
Discrete Gestures and Continuous Gestures 51
Implementing Gesture Recognition 52
Preparing a Gesture Recognizer 52
Responding to Gestures 53
Interacting with Other Gesture Recognizers 54
Requiring a Gesture Recognizer to Fail 54
Preventing Gesture Recognizers from Analyzing Touches 55
Permitting Simultaneous Gesture Recognition 55
Regulating the Delivery of Touches to Views 56
Default Touch-Event Delivery 56
Affecting the Delivery of Touches to Views 57
Creating Custom Gesture Recognizers 57
State Transitions 58
Implementing a Custom Gesture Recognizer 59
Chapter 6
Graphics and Drawing 63
Drawing Shapes Using Bezier Paths 63
Bezier Path Basics 63
Adding Lines and Polygons to Your Path 64
Adding Arcs to Your Path 64
4
2010-03-24 | © 2010 Apple Inc. All Rights Reserved.
CONTENTS
Adding Curves to Your Path 65
Creating Oval and Rectangular Paths 66
Modifying the Path Using Core Graphics Functions 67
Rendering the Contents of a Bezier Path Object 68
Doing Hit-Detection on a Path 69
Generating PDF Content 70
Creating and Configuring the PDF Context 71
Drawing PDF Pages 72
Creating Links Within Your PDF Content 74
Chapter 7
Custom Text Processing and Input 77
Input Views and Input Accessory Views 77
Simple Text Input 78
Communicating with the Text Input System 79
Overview of the Client Side of Text Input 80
Text Positions and Text Ranges 81
Tasks of a UITextInput Object 81
Tokenizers 82
Facilities for Text Drawing and Text Processing 82
Core Text 82
UIStringDrawing and CATextLayer 84
Core Graphics Text Drawing 85
Foundation-Level Regular Expressions 85
ICU Regular-Expression Support 86
Spell Checking and Word Completion 87
Custom Edit Menu Items 88
Document Revision History 91
5
2010-03-24 | © 2010 Apple Inc. All Rights Reserved.
CONTENTS
剩余91页未读,继续阅读
资源评论
- xfreshy11092012-04-20官方文档,很好,谢谢分享。
- mido20072011-10-13好,官方权威,受用
- conccy2011-09-21官方文档,就没必要挂这么多分了吧,
- blueterry2015-07-11有参考价值...
yuqiyue1106
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
- 课设-内部排序算法比较 包括冒泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、归并排序和堆排序.zip
- Python排序算法.zip
- C语言实现直接插入排序、希尔排序、选择排序、冒泡排序、堆排序、快速排序、归并排序、计数排序,并带图详解.zip
- 常用工具集参考用于图像等数据处理
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功