O'Reilly logo

iPhone and iPad App 24-Hour Trainer by Gene Backlin, Abhishek Mishra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13

Table Views

To display a list of values, the table view is one of the most common user interface elements in iOS development. The table view is more common in iPhone applications than in iPad applications because of the size of the viewing area.

In addition to displaying a scrollable list of data, you can present the list in the following ways to make viewing easier:

  • As an indexed list
  • As a part of related groups

Developers use the table view within a navigation controller–based application as a way to drill down through a hierarchical set of data. This style of application can be created easily by choosing the Master-Detail Application from the application template upon Xcode project creation.

The physical makeup of the table view is limited to a single-column vertical scrolling control. The list can be presented in groups along with a header and footer for each group section, and each section contains a row of data related to that specific section.

The Contacts application that is pre-installed on all iOS devices uses the indexed format to present names. The sections are grouped by the letters of the alphabet, and within each letter group, are the rows of names beginning with that letter. For example, under the group J would be a name Jones.

In this lesson you learn how to add data to a table view. You learn how to group related information into sections, and you learn how to transfer data from a selected table view cell to a separate detail view controller to display ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required