To observe the change in isSelected
for every dictionary in the array, you will have to register as an observer with every dictionary in the array. As I say in my book:
You can do that efficiently with NSArray’s instance method
addObserver:toObjectsAtIndexes:forKeyPath:options:context:
, but if the array itself is mutable then you’re also going to have to register for that key with any new dictionaries that are subsequently added to the array (and unregister when a dictionary is removed from the array).
That last part can get really daunting. Under many circumstances, it might be best to give up entirely and just use a custom class that emits a notification when it is mutated (instead of an NSDictionary, and instead of KVO).