Triggers in Master Data

How can I create triggers or something equivalent for the underlying data model in my application? My main data model has many objects, and these entities are not related to any relationships. I want to trigger the trigger whenever new data is added or when the data changes in the main data.

Thanks.

+4
source share
2 answers

You can use NSFetchResultController in such situations. Detailed information can be found in this tutorial.

+2
source

To achieve this, you must use the NSFetchedResultsController .

According to Apple documentation:

You use the result controller to effectively manage the results returned from the master data fetch request to provide data for the UITableView object.

Here is a good tutorial to get you started: http://www.raywenderlich.com/999/core-data-tutorial-how-to-use-nsfetchedresultscontroller

0
source

All Articles