Chapter 7. Using the Table View

WHAT YOU WILL LEARN IN THIS CHAPTER:

  • How to manually add a Table view to a View, and wire the data source and delegate to your View Controller

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

  • How to handle the various events in the Table view so that users can select the items contained within it

  • How to display text and images in the rows of the Table view

  • How to use a Table view in a Split View-based Application

  • How to display the items from a property list in a Table view

  • How to group the items in a Table view into sections

  • How to add indexing to the Table view

  • How to add search capabilities to the Table view

  • How to add disclosures and checkmarks to rows in the Table view

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

In Chapter 4, you had your first taste of the Table view when you developed a Split View-based Application project. That chapter didn't fully dive into how the Table view works, and a lot of details were purposely left out. The Table view is such an important topic that it deserves a chapter on its own.

In this chapter, you examine the Table view in detail and explore the various building blocks that make it such a versatile view.

Figure 7.1. FIGURE 7-1

A SIMPLE TABLE VIEW

The best way to understand how to use a ...

Get Beginning iPad™ 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.