O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

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

Adding an Index

A nice feature of the Contacts app is the quick A–Z index shown on the right side. Because you are using a fetched results controller, adding an index like this is as simple as adding the following two methods in CarTableViewController.m after tableView:titleForHeaderInSection::

- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {     return [fetchedResultsController sectionIndexTitles]; } - (NSInteger)tableView:(UITableView *)tableView         sectionForSectionIndexTitle:(NSString *)title         atIndex:(NSInteger)index {     return [fetchedResultsController sectionForSectionIndexTitle:title                                                          atIndex:index]; }

Run the app, ...

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