Show Subtitles in the Table

With the full object available in the table, you can now add a subtitle to the table display. To do this, you need to change the cell style and specify what text to show as the subtitle.

1. Select the Prototype Cell in Storyboard and change the Style in Attributes Inspector to Subtitle.

2. Add line 1 in tableView:cellForRowAtIndexPath: in LMATableContactsController, as shown in Listing 12.12.

Listing 12.12 Setting the Subtitle for the Table

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{    static NSString *CellIdentifier = @"ContactsCell";    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath ...

Get Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android 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.