iPhone OS Reference Library Apple Developer Connection spyglass button

Introduction

For iPhone applications that use view objects to draw content to the screen, view controllers provide a vital link between those view objects and the rest of the application. View controllers are traditional controller objects in the Model-View-Controller design paradigm but they also provide much more. In iPhone applications, view controllers provide much of the logic needed to manage basic application behaviors. For example, view controllers manage the presentation and removal of content from the screen and they manage the reorientation of views in response to device orientation changes.

Who Should Read This Document?

Understanding when and how to use view controllers is crucial to the design of iPhone applications. View controllers provide fundamental infrastructure that makes it easier for you to implement your applications and ensures that your applications behave consistently with the platform’s interface guidelines. Of course, the basic features provided by view controllers can only go so far. At some point, your custom code must take over to present your custom content. This document shows you what behaviors view controllers provide and where you can customize those behaviors to suit your own needs.

Important: The contents of this document apply to iPhone applications only. Although Mac OS X applications also support a type of view controller, they do so using a different class that has different requirements and behaviors.

Prerequisites

Before you start reading this document, you should have at least a fundamental understanding of the following Cocoa concepts:

Developers who are new to Cocoa and Objective-C can get information about all of these topics in Cocoa Fundamentals Guide.

Development of iPhone applications requires an Intel-based Macintosh computer running Mac OS X v10.5 or later. You must also download and install the iPhone SDK. For information about how to get the iPhone SDK, go to http://developer.apple.com/iphone/.

Organization of This Document

This document contains the following chapters:

Providing Feedback

If you have feedback about the documentation, you can provide it using the built-in feedback form at the bottom of every page.

If you encounter bugs in Apple software or documentation, you are encouraged to report them to Apple. You can also file enhancement requests to indicate features you would like to see in future revisions of a product or document. To file bugs or enhancement requests, go to the Bug Reporting page of the ADC website:

http://developer.apple.com/bugreporter/

You must have a valid ADC login name and password to file bugs. You can obtain a login name for free by following the instructions found on the Bug Reporting page.

See Also

For additional information about application design, see iPhone Application Programming Guide and iPhone Human Interface Guidelines.

For information about the view controller classes discussed in this document, see UIKit Framework Reference.



Last updated: 2009-10-19

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