I’m trying to write a tabbed application with three tabs where data is being displayed from the core data using Fetched Results Controller.
- Tab 1 shows a list of items in core data.
- Tab 2 has an action that deletes an item in the core data.
Now even though when I delete an item within tab 1, table view updates to depict changes.
BUT when I delete an item from within tab 2, and then go back to tab 1, table is not up to date.
I tried delegating to view controller of tab 1 whenever I delete an item in tab 2, where table 1’s view controller then calls:-
[self.tableView reloadData];
// Still doesn't work
When I quit the application and launch it again it does show updated data.
Can anyone please help. Thanks a lot.
Are you making sure you’re saving your ManagedObjectContext after the delete? If you are creating two core data contexts (one for each tableView) and not saving the delete on the second tab then you’ll be getting the symptoms you described.