Index Path Access

The fetched results class offers object–index path integration in two directions. You can recover objects from a fetched object array using index paths by calling objectAtIndexPath:. You can query for the index path associated with a fetched object by calling indexPathForObject:. These two methods work with both sectioned tables and tables that are flat—that is, that use only a single section for all their data.

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.