O'Reilly logo

iOS Programming: The Big Nerd Ranch Guide, 6th Edition by Aaron Hillegass, Christian Keur

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

12 Subclassing UITableViewCell

A UITableView displays a list of UITableViewCell objects. For many applications, the basic cell with its textLabel, detailTextLabel, and imageView is sufficient. However, when you need a cell with more detail or a different layout, you subclass UITableViewCell.

In this chapter, you will create a subclass of UITableViewCell named ItemCell that will display Item instances more effectively. Each of these cells will show an Item’s name, its value in dollars, and its serial number (Figure 12.1).

Figure 12.1  Homepwner with subclassed table view cells

Screenshot shows the final, intended output of the Homepwner app, after creating a subclass of UITableViewCell for adding serial Number.

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