objective c - monitor changes on NSManagedObject similar to NSFetchedResultsController -
i implemented class similar nsfetchedresultscontroller
- call dkdataarray
. unlike nsfetchedresultscontroller
doesn't fetch objects database gets them relation of object.
i want extend in way monitors changes in fetched objects , propagates changes delegate - nsfetchedresultscontroller
does.
this delegate method i'd support:
@protocol dkdataarraydelegate @optional - (void)dataarray:(dkdataarray *)dataarray didchangeobject:(id)anobject atindex:(nsinteger)index; @end
how can that?
thanks in advance!
you can register nsmanagedobjectcontextobjectsdidchangenotification
of managed object context. documentation:
posted when values of properties of objects contained in managed object context changed. notification posted during
processpendingchanges
, after changes have been processed, ...
notification object managed object context. userinfo dictionary contains following keys:nsinsertedobjectskey
,nsupdatedobjectskey
, ,nsdeletedobjectskey
.
Comments
Post a Comment