iOS Reference Library Apple Developer
Search

A Survey of Device Features

Your iPhone application does not need to be isolated from the rest of the system. In fact, the best applications take advantage of hardware and software features built in to the device to provide a richer, more compelling experience for the user.

This brief chapter surveys the various device features you may want to use. In some cases, a feature is described in detail in a later chapter in this document. In other cases, the feature has a dedicated programming guide.

Address Book and Contacts

To access the user’s contacts, use the Address Book framework. You can also present standard system interfaces for picking and creating contacts with the Address Book UI framework.

For details, see Address Book Programming Guide for iOS.

Calendar Events

To schedule and access time-based events, use the Event Kit and Event Kit UI frameworks. Events scheduled using the Event Kit framework show up in the Calendar application and in other applications that support that framework.

For details, see Event Kit Programming Guide, Event Kit Framework Reference, and Event Kit UI Framework Reference.

Maps and Location

To incorporate maps into your application, and to add information layers on top of those maps, use the Map Kit framework.

To take advantage of the user’s location—such as to limit a search for restaurants to those within a specified radius—use the Core Location framework.

For details on each of these features, see Location Awareness Programming Guide.

Camera and Photo Library

To use the camera for taking pictures or movies, or to access the user’s photo library, use the UIImagePickerController class.

For details, see “Using the Camera and Photo Library.”

For more advanced use of the camera, including adding augmented reality features to your application, refer to AV Foundation Framework Reference.

Audio Hardware and iPod Library

To access the contents of a user’s iPod Library, use the Media Player framework. This framework lets you create your own music player that has access to all of the audio contents of the user’s iPod Library. You can also use this framework to play items from the iPod Library while your game or other application is running.

Beyond this, iOS devices provide a wide range of audio hardware and software features you can take advantage of, among them the following:

To access these features, use the various Core Audio frameworks and the audio-specific classes in the AV Foundation framework.

For details, see “Using Audio” in Multimedia Programming Guide.

Item Quick Look Previews

To provide previews of iWork documents, PDF files, images, and other items, use the UIDocumentInteractionController class or the Quick Look framework. A document interaction controller can also help a user find an application on their system that is capable of opening an item. It does this by way of an options menu in the user interface.

Applications most likely to benefit from previews are those which may receive items that the application cannot open directly. For example, if you are writing an email agent or a remote disk browser, you will likely want to include preview support.

For details, see “Previewing and Opening Items.”

Copy, Cut, and Paste Operations

iOS supports copy, cut, and paste operations within and between applications. You gain access to these features by using the UITextView, UITextField, and UIWebView classes, or by implementing copy/cut/paste in your application using various UIKit classes.

For details, see “Using Copy, Cut, and Paste Operations.”

Edit Menu

iOS provides a context-sensitive edit menu that can display the system commands Copy, Cut, Paste, Select, Select All, and Delete. To add a custom item to this menu, create an instance of the UIMenuItem class and add it to the singleton UIMenuController object.

For details, see “Adding Custom Edit Menu Items.”

Custom Input and Accessory Views

You can substitute a custom input view for the system keyboard. You can also enhance the system keyboard with an accessory view for customized input or to provide information to the user. To use this facility, set the inputView or inputAccessoryView properties of a UITextView object (or any object that inherits from the UIResponder class).

For details, see UIResponder Class Reference.

Mail and Messages (SMS)

To present the standard system interfaces for composing and sending email or SMS messages, use the view controller classes in the Message UI framework.

For details, see “Using System Messaging Facilities.”

Cellular Telephone Information

To access information about active cellular telephone calls, or to access cellular service provider information from the user’s SIM card, use the Core Telephony framework. VoIP (Voice over Internet Protocol) applications are likely to benefit from these features.

For details, see “Accessing Cellular Telephone Information.”

User Interaction Event Handling

User interaction events are objects that inform your application of user actions—such as when a user touches a view, tilts the device, or presses a button on the headset. To work with events, including complex gesture events such as multitouch and shaking, use the UIEvent, UIAccelerometer, and related classes in the UIKit framework.

For details, see Event Handling Guide for iOS.

Hardware Accessories

To interact with external hardware connected by wire or Bluetooth, use the External Accessory framework.

For details, see External Accessory Programming Topics.




Last updated: 2010-04-30

Did this document help you? Yes It's good, but... Not helpful...