Customizing Table Appearance

While it’s great to have the Twitter data in our table cells, only having access to a single, one-line text label makes it impossible to show the various fields of the ParsedTweet; at this point, we don’t even know who sent which tweet! We need to change what these table cells look like, to provide more room to show our data.

Table Cell Styles

When we create the UITableViewCell in tableView(cellForRowAtIndexPath:), our init method takes a style argument. As it turns out, this can allay our problems somewhat.

The available styles are collected in an enumeration, which declares both a type and a closed set of possible values for that type. Four cell styles are defined in the UITableViewCellStyle enumeration, of which ...

Get iOS 8 SDK Development, 2nd 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.