I’m working on an app that relies on a set of data that can be sorted in a variety of ways. I’ve got core-data setup. I have a fetch request that brings in all of the records. I’ve got a sort button on the left side of the nav controller. It brings up a modal view with table that has my sort options. when you change the option it closes the modal view. I can access the selected option using [[NSUserDefaults standardUserDefaults] objectForKey:@”sortOption”].
Now I need to somehow update the fetch request with a new array of sort descriptors and change the sectionNameKeyPath.
I’ve tried setting fetchedResultsController to nil and calling reloadData on the table view. Nothing seems to update.
Any ideas?
Howie
Solved my problem!
Looks like all I needed to do after redefining the fetch request, is perform the fetch and reload the table data.