Chapter 5. Introducing UIViewController

In This Chapter

Understanding how Cocoa Touch fits in the Model, View, Controller design pattern
Learning the basics of UIViewController
Building a basic iPhone app that uses UIViewController

When developing the Cocoa Touch frameworks, Apple took the opportunity to standardize and codify its toolset for working with views and for navigating hierarchical lists of data. Many developers are already familiar with the Model, View, Controller design pattern that is in common use in Cocoa and Cocoa Touch, as well as in other programming languages such as Java. Cocoa has long supported this design pattern, particularly with regard to its views and model classes, but only recently has it really begun to solidify its concept of how a controller fits into its framework. Don't misunderstand; good developers working with Cocoa have always utilized controllers in their code, but with the introduction of Cocoa Touch, Apple has made a set of classes specifically designed to be inherited from when developing view controllers. These classes are UIViewController and UITableViewController.

In addition to providing these classes, which, by default, give you a certain amount of functionality straight out of the box, Apple has also provided an entire navigation framework that works with these controllers to make creating complex user interfaces, or UIs, that manipulate trees of hierarchical data incredibly easy to develop. The navigational classes associated with this ...

Get Cocoa Touch™ for iPhone® OS 3 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.