Is there a way to update a UITableView sections and rows after changing the fetchedResultsControllers NSpredicate (and executing the fetch)? I would like to use controllerWillChangeContent delegate methods to update my table when the searchText in my searchBar is changed.
Currently in my app, these delegate methods only get called when changes in coredata occur. Not when changing the resultsController predicate & executing the fetch.
If I simply call [self.tableView reloadData]
on each textchange, there are no animations and it blocks the experience a bit.
Or should I do something completely different to update the tableView contents on each search text entry change?
I've had another look into Apple's documentation and it looks like the NSFetchedResultsControllerDelegate methods are not called when a predicate has changed:
An instance of NSFetchedResultsController uses methods in this protocol to notify its delegate that the controller’s fetch results have been changed due to an add, remove, move, or update operations.
So, to answer my own question: It's not possible to use NSFetchedResultsControllerDelegate to update the table after NSFetchedResultsController predicate changes.
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