Custom setter methods in Core-Data
问题 I need to write a custom setter method for a field (we'll call it foo ) in my subclass of NSManagedObject . foo is defined in the data model and Xcode has autogenerated @property and @dynamic fields in the .h and .m files respectively. If I write my setter like this: - (void)setFoo: (NSObject *)inFoo { [super setFoo: inFoo]; [self updateStuff]; } then I get a compiler warning on the call to super . Alternatively, if I do this: - (void)setFoo: (NSObject *)inFoo { [super setValue: inFoo forKey: