Getting sectionNameKeyPath to work with CoreData/UITableViewController
- by Elon
In my AppDelegate I create an NSFetchedResultsController with sectionNameKeyPath set to @"group".
In viewWillAppear in my TableViewController I performFetch, then call a method called findGroups.
findGroups does some complicated analysis of the entire dataset to identify groups, then sets the "group" transient property on each object to the correct string value. I can see with NSLog that these are all set correctly and in coherent groups.
But, tinker as I may, my cells are shown in a single section with the title of the first group. Any ideas?