Skip to Main Content
Professional iPhone® and iPad™ Application Development
book

Professional iPhone® and iPad™ Application Development

by Gene Backlin
November 2010
Intermediate to advanced content levelIntermediate to advanced
600 pages
14h 21m
English
Wrox
Content preview from Professional iPhone® and iPad™ Application Development

Chapter 3. Custom Table Views

WHAT'S IN THIS CHAPTER?

  • How to design a custom Table view cell in Interface Builder

  • How to incorporate your custom Table view cell into the standard Table view

  • How to load a property list file into a custom Table view

One of the biggest challenges with mobile devices is presenting data logically, efficiently, and clearly. The most common form of display on mobile devices is the Table view, which is a single-column list of many rows of data. iOS 4 offers a standard Table view that can be plain, indexed, or grouped.

However, sometimes you want the cells to have a different look than those offered by Apple. This chapter shows you how to customize the Table view cell, to give your Table view application its own look and feel.

TABLE VIEWS

Simply put, Table views display information in the form of a list. Determining how data is displayed in a Table view depends on two methods:

  • numberOfSectionsInTableView — Determines the number of grouped sections that exists. For a plain list, there is only one section.

  • tableView:numberOfRowsInSection: — Informs the Table view how many rows are contained in each section

Putting information into each Table view cell is the responsibility of the tableView:cellForRowAtIndexPath: method, where the indexPath contains the section, [indexPath section], and row values, [indexPath row].

When the user chooses a particular Table view cell, the tableView:didSelectRowAtIndexPath: method handles the selection.

If your application supports removing ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Professional Visual Studio® 2010

Professional Visual Studio® 2010

Nick Randolph, David Gardner, Michael Minutillo, Chris Anderson
Navigating the Metaverse

Navigating the Metaverse

Cathy Hackl, Dirk Lueth, Tommaso Di Bartolo, John Arkontaky, Yat Siu
Navigating the Metaverse

Navigating the Metaverse

Cathy Hackl, Dirk Lueth, Tommaso Di Bartolo

Publisher Resources

ISBN: 9780470878194Purchase book