How to return the number of sections in a UITableView with Core Data

I can never remember how to do this. Here’s the method provided by the Master / Detail template when using Core Data:

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    return [[self.fetchedResultsController sections] count];

Leave a Reply

Your email address will not be published. Required fields are marked *