I'm new to this Core Data business.
I got a UITableViewController hooked up with a NSFetchedResultsController. In viewDidLoad
, I fire a request to get necessary data from the server, then use [self.fetchedResultsController performFetch:&error]
to update the table view. All works fine until that point.
Now I want to move the data fetching stuff to another thread, so after the app received a NSArray object from the server, it performs the didFinishFetchingItems
selector on the main thread. In that selector, I save the NSArray to the Core Data store and have the fetchedResultsController
perform a fetch. No data show up, although a NSLog
reveals that the data is still there (e.g. [[fetchedResultsController fetchedObjects] count]
returns 100). I have to put a [self.tableView reloadData]
at the end of the method to refresh the table view manually.
My question is: What have I done wrong? Why did I need to do the table view refreshing manually?