O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

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

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 ...

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