Dirty flags on Realm objects
问题 Can anyone suggest a good pattern for implementing a dirty flag on Realm objects? Specifically, I would like every subclass of Realm Object to expose an isDirty flag that gets set whenever an instance of the class is modified and is cleared whenever the instance is written to the cloud (not the Realm). I'm working in Objective-C. Possible solutions I can think of include the following: Write a custom setter for every property of every objects. Set isDirty within each of those setters. Not