Key-Value Observing an NSMutableSet
问题 In a plain class I have a NSMutableSet property. Whenever objects are added to or removed from the set, I want to perform some custom code. I know I could write a few addObjectToSet: -like methods to the class, but I was wondering if there's a more elegant solution with direct KVO on the set. As it turns out, NSSet will raise an exception when you try to add an observer to it. Not surprisingly, for there's probably no named keyPath to observe. The documentation is pretty clear about the