Table View Cells

The UITableViewCell class offers four utilitarian base styles, which are shown in Figure 9-2. This class provides two text label properties: a primary textLabel and a secondary detailTextLabel, which is used for creating subtitles. The four styles are as follows:

Image UITableViewCellStyleDefaultThis cell offers a single left-aligned text label and an optional image. When images are used, the label is pushed to the right, decreasing the amount of space available for text. You can access and modify detailTextLabel, but it is not shown onscreen.

UITableViewCellStyleValue1This cell style offers a large black primary label on the left ...

Get The Core iOS Developer’s Cookbook, Fifth Edition 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.