I can create new managed objects inside my app, in a separate view I have a table view which shows all the objects I have.
When I create a new managed object (in a total
You are setting your UITableViewController
as the NSFetchedResultsControllerDelegate
. That's good. Now try to implement the controllerDidChangeContent:
method in the TableViewController like so:
- (void)controllerDidChangeContent:(NSFetchedResultsController *)controller {
[self.tableView reloadData];
}
Your NSFetchedResultsController
will listen to removed or new objects in Core Data and notify its delegate (your TableViewController) of changes. Check the Core Data template project in Xcode to implement this even better with add and removal animations in the UITableView
.