Whenever i make a change in the objects in the first tab of my application the updates are automatically upated in tab 2 becuase it uses a fetchedResultsController. Now i have a third tab that should also update itself, but how can i do that?
I only have a nsmangedObjectContext in the third tab to get the appropriate data. How can i receive notifications whenever the objects in this context change?
I am also struggeling with the question how i can make my data fetching more efficient, becuase tab 2 and 3 use the same set of data. I am currently making another fetch in tab 3, to get the same data as tab 2. I dont know how i can use the data from tab2 without disturbing the fetchedresultscontroller.
Information on this subject would really be appreciated!!
If your tableviews are very closely related, then you can just have a single
UITableViewDataSourcethat provides data for both of them, and have it manage theNSFetchedResultsController. From your description, this case seems very likely.If the tableviews are not very similar, such that having a single
UITableViewDataSourcewould create excessiveif()logic, then move yourNSFetchedResultsControllerinto an separate model object and postNSNotificationswhen it receives delegate call-backs. YourUITableViewDataSourcescan then observe those notifications to update themselves when they are on-screen.