Tải bản đầy đủ (.pdf) (9 trang)

Lập trình ứng dụng cho iPhone part 21

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (532.91 KB, 9 trang )

423
appendix A:
iPhone OS class reference
After this book, your main resource for learning more about the iPhone should be the
references at developer.apple.com. To help you find documents that might interest
you, this appendix lists the major classes in the
UIK
it and Foundation hierarchies that
you might want to know more about, excluding classes that only appear as a part of
another class.
A.1 UIKit framework classes
The
UIK
it framework contains those classes most tightly connected to the iPhone,
including all of the graphical classes you use to make up pages. A partial listing
appears as table A.1. It’s current as of iPhone
OS
2.1, and will probably be mostly cor-
rect when you read this, but the
UIK
it does sometimes change between releases.
Table A.1 A listing of the most important User Interface classes
Class Parent Summary
UIActionSheet UIView
A pop-up window that includes
options; similar to a
UIAlertView
UIActivityIndicatorView UIView
An indeterminate progress display
UIAlertView UIView
A pop-up window that includes


options; similar to a
UIActionSheet
UIApplication UIResponder
The main source for application
information and control
UIButton UIControl
A push button
UIColor NSObject
A color output class
424
A
PPENDIX
A
iPhone OS class reference
UIControl UIView
An abstract class that is parent to
many user controls
UIDatePicker UIControl
A wheeled date-selection device
UIDevice NSObject
A class that holds info about the
iPhone itself
UIEvent NSObject
A container for touches; part of
the event model
UIFont NSObject
A font output class
UIImage NSObject
A non-displaying image holder
UIImagePickerController UINavigationController

A modal controller for image
selection
UIImageView UIView
An image display that holds one
or more
UIImage
objects
UILabel UIView
A small, non-editable text display
UINavigationController UIViewController
A hierarchical controller; often
linked with a
UITableView-
Controller
to produce
hierarchical menus
UIPageControl UIControl
A toolbar for navigating among
pages using dots
UIPickerView UIView
A wheel-based selection mecha-
nism
UIProgressView UIView
A determinate progress display
UIResponder NSObject
An abstract class that defines all
classes that can receive and
respond to events
UIScreen NSObject
A class containing an iPhone’s

entire screen
UIScrollView UIView
A parent class for views with mul-
tiple pages of content
UISearchBar UIView
A text-input mechanism special-
ized for searches
UISegmentedControl UIControl
A control for making one of sev-
eral choices
UISlider UIControl
A control for setting discrete
values
Table A.1 A listing of the most important User Interface classes (continued)
Class Parent Summary
425Foundation framework classes
A.2 Foundation framework classes
Foundation framework classes, whose names begin with
NS
, are almost as important as
the
UI
classes because they represent foundational variable types, like strings and
numbers. Table A.2 only lists the major classes that have some relevance to the sort of
work you’ve done in this book; for more, look at Apple’s developer site under “Core
Services” frameworks.
UISwitch UIControl
A control for selecting binary
values
UITabBarController UIViewController

A controller for moving among
multiple screens
UITableViewController UIViewController
A controller for displaying tables
of content; often linked with a
UINavigationController
UITextField UIControl
A control for inputting short text
UITextView UIScrollView
A display for text of any size
UITouch NSObject
An individual touch on the
iPhone’s screen
UIView UIResponder
The abstract class that lies at the
core of most
UIKit
objects
UIViewController UIResponder
A simple view controller
UIWebView UIView
A Safari-like web browser
UIWindow UIView
The root for the view hierarchy
Table A.2 A listing of the most important Foundation classes
Class Parent Summary
NSArray NSObject
An array
NSAutoreleasePool NSObject
A memory-management class

NSBundle NSObject
A pointer toward a project’s file system home
NSCharacterSet NSObject
Methods for managing characters
NSCountedSet NSMutableSet
An unordered collection of elements
NSData NSObject
A wrapper for a byte buffer
NSDictionary NSObject
An associative array
NSError NSObject
Encapsulated error information
Table A.1 A listing of the most important User Interface classes (continued)
Class Parent Summary
426
A
PPENDIX
A
iPhone OS class reference
A.3 Other classes
The
UI
and
NS
classes should contain most of the objects you use when programming.
We’ve also covered several other frameworks throughout this book, including the
Address Book framework (chapter 16), the Address Book
UI
framework (chapter 16),
the Core Location framework (chapter 17), the Core Audio framework (chapter 18),

the Media Player framework (chapter 18), the Core Graphics framework (chapters 18
and 19), the Quartz Core framework (chapter 19), the Open
GL

ES
framework (chap-
ter 19), and the
CFN
etwork framework (chapter 20). Finally, you may wish to pay some
attention to the Core Foundation framework, which we’ve used (as infrequently as
possible) throughout part 4 of this book.
NSFileHandler NSObject
A methodology for controlling files
NSFileManager NSObject
A manager for file system work
NSIndexPath NSObject
A node path
NSLog NSObject
A very important object for debugging; logs a
formatted string to the system log
NSMutableArray NSArray
An array that can be changed
NSMutableCharacterSet NSCharacterSet
A character set that can be changed
NSMutableData NSData
Data that can be changed
NSMutableDictionary NSDictionary
A dictionary that can be changed
NSMutableSet NSSet
A set that can be changed

NSMutableString NSString
A string that can be changed
NSMutableURLRequest NSURLRequest
A URL request that can be changed
NSNotificationCenter NSObject
A notification manager
NSNumber NSValue
A way to encapsulate many types of numbers
NSObject N/A
The root class for Cocoa Touch
NSString NSObject
A class for various sorts of string storage and
manipulation
NSURL NSObject
A simple URL object
NSURLRequest NSObject
A URL plus a cache policy
NSValue NSObject
A simple container for data
NSXMLParser NSObject
An XML parser
Table A.2 A listing of the most important Foundation classes (continued)
Class Parent Summary
427
appendix B:
External
sources and references
What follows are web resources that we suggest for continuing your exploration of
iPhone development.
B.1 General resources

B.2 Web app resources
Site URL Summary
The Apple Blog General Apple blog, including some iPhone
discussion
iPhone Atlas iPhone news blog
iPhone Dev Forums Forums for SDK or web discussion
iPhone in Action The authors’ blog for this book; we’ll keep
you up to date with new links of interest
and occasionally cover some of the topics
that we didn’t cover in this book
iPhone in Action on
Magnolia

iPhoneInAction/
The authors’ listing of links of note
Site URL Summary
Apple Developer
Connection
/>webapps/
The official Apple site for developer resources;
requires ADC login
iPhoneWebDev The authors’ own site, complete with examples
and webdev discussion list
WebKit Open
Source Project
WebKit home, including the Surfin’ Safari blog

×