Need reloadData on the table after each execution of the Fetch?

This is my stupid question. Boo, I need to call

[table reloadData]; 

after every time I call executeFetch in NSFetchedResultsController to update the table view?

 [self fetchedResultsController] performFetch:nil]; 
+4
source share
2 answers

If you configure the UITableViewController as NSFetchedResultsControllerDelegate, you can implement the controllerDidChangeContent: method:

 - (void)controllerDidChangeContent:(NSFetchedResultsController *)controller { [self.tableView reloadData]; } 

Take a look at fooobar.com/questions/434100 / ....

Apple documentation here

Happy coding :)

+1
source

if the method [self fetchedResultsController] performFetch:nil]; leads to a new data set, and you want to load a table with this new data, you will need to do this work.

+3
source

Source: https://habr.com/ru/post/1391603/


All Articles