KVO on an NSCountedSet?
问题 I'd like to monitor an NSCountedSet to see if its contents changes. Setting up KVO seems to compile but it's not being triggered. First question: can you observe a set? If so then is there something wrong with this message? [subViewA addObserver:subViewB forKeyPath:@"countedSet" options:0 context:NULL]; I'm really just trying to monitor the count of (number of objects in) the set if that helps. Edit - here's the observer (subViewB): - (void)observeValueForKeyPath:(NSString *)keyPath ofObject: