Chapter 8. Working within the UINavigationController Model

In This Chapter

Displaying hierarchical lists of data using UINavigationController
Configuring the UINavigationBar and the buttons that control its navigation
Pushing and popping UIViewControllers on a UINavigationController
Allowing adding, editing, and deleting of rows

In this chapter, you're going to take an in-depth look at how the UINavigationController navigation model works and how to make your UIViewControllers fit within that navigational model. You'll begin by exploring the details of the UINavigationController. You will then take a look at how to use your UIViewController with the UINavigationController to navigate your data. When finished with this chapter, you should have a solid, basic understanding of how this fundamental set of classes works and how you can utilize them in your code.

Understanding the UINavigationController Navigational Model

The UINavigationController provides an architecture for managing a stack of UIViewControllers. Typically, this is used to manage lists or trees of data where you are choosing an item from a list and then subsequently you need to bring in an additional view to edit that item or show detailed information for that item. This is one of the most commonly used GUI tools in Cocoa Touch.

Figure 8.1 shows the UINavigationController architecture at work. Specifically, it shows how the UINavigationController provides sort of a moving window from view controller to view controller.

Figure 8.1. How ...

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.