I declared my fetchedResultsController like this
NSFetchedResultsController *fetchController = [[NSFetchedResultsController alloc]
initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext
sectionNameKeyPath:@"date" cacheName:nil];
But when I click on a UISegmentedControl, I want to change the sectionNameKeyPath to be @"title".
Do you know a way to do so ?
Thanks
You would need to redefine the FRC and reinitiate the fetch request. Either set a property on the class to hold the value of the current sectionNameKeyPath (set the default in the viewDidLoad event), or you can pass that in to the method that instantiates and executes the FRC.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With