0

I want to set update date to NSManagedObject each time object is changed. Is there method similar to awakeFromInsert ?

Lorenzo B
  • 33,216
  • 24
  • 116
  • 190
Nik
  • 9,063
  • 7
  • 66
  • 81

1 Answers1

2

Use NSManagedObjectContextObjectsDidChangeNotification.

This notification is (source Apple doc)

Posted when values of properties of objects contained in a managed object context are changed.

A typical example for using it it is well explained in Marcus Zarra's PARENT WATCHING ITS CHILD blog post.

Hope that helps.

Lorenzo B
  • 33,216
  • 24
  • 116
  • 190