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 UIKit 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 UIKit 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 correct when you read this, but the UIKit 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

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 mechanism

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 multiple pages of content

UISearchBar

UIView

A text-input mechanism specialized for searches

UISegmentedControl

UIControl

A control for making one of several choices

UISlider

UIControl

A control for setting discrete values

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

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.

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

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

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 OpenGL ES framework (chapter 19), and the CFNetwork 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.188.161