Chapter 8. Using the Table View

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Manually adding a Table view to a view, and wire the data source and delegate to your View Controller

  • Handling the various events in the Table view to populate it with items

  • Handling the various events in the Table view so that users can select the items it contains

  • Displaying text and images in the rows of the Table view

  • Displaying the items from a property list in a Table view

  • Grouping the items in a Table view into sections

  • Adding indexing to the Table view

  • Adding search capabilities to the Table view

  • Adding disclosures and checkmarks to rows in the Table view

  • Navigating to another View window

One of the most commonly used views in iPhone applications is the Table view. The Table view is used to display lists of items from which users can select, or they can tap it to display more information about a particular item. Figure 8-1 shows a Table view in action in the Settings application.

The Table view is such an important topic that it deserves a chapter of its own. Hence, in this chapter, you examine the Table view in details, and learn about the various building blocks that make it such a versatile view.

Figure 8-1

Figure 8.1. Figure 8-1

A Simple Table View

The best way to understand how to use a Table view in your application is to create a new View-based Application project and then manually add a Table view to the View window and wire ...

Get Beginning iOS 4 Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.