问题
What's the most simple way to implement a plain data object which conforms key-value-observing?
回答1:
Make an class with properties for its plain value attributes and KVC-compliant collection accessors for collections. Foundation magic will take care of the notifications for a simple object like that.
来源:https://stackoverflow.com/questions/5386497/whats-the-most-simple-way-to-implement-a-plain-data-object-which-conforms-key