Chapter 5. Creating basic view controllers

 

This chapter covers

  • Understanding the importance of controllers
  • Programming bare view controllers
  • Utilizing table view controllers

In the last two chapters, we’ve offered a hands-on look at the two core tools used to program using the SDK: Xcode and Interface Builder. In the process, we haven’t strayed far from the most fundamental building block of the SDK: the view, whether a UILabel, a UIWebView, or a UIImageView.

Ultimately, the view is only part of the story. As we mentioned when we looked at the iPhone OS, views are usually connected to view controllers, which manage events and otherwise take the controller role in the MVC model. We’re now ready to begin a three-part exploration of what that all means.

In this chapter, we look at basic view controllers that manage a single page of text. With that basis, we can examine events and actions in chapter 6, correctly integrating them into the MVC model. Finally, in chapter 7, we’ll return to the topic of view controllers to look at advanced classes that can be used to connect up several pages of text.

5.1. The view controller family

5.2. The standard view controller

5.3. The table view controller

5.4. Summary