Search code examples
iphoneioskey-value-observingnsnotificationcenternsnotification

KVO - How to get a list of an objects registered observers


I am registering an observer on a bunch of tableview controllers dynamically so I need to remove previous observers if they were registered on the same object. To do this I need to check if the observer exists on the object.

Is this possible? I know with NSNotification you can use the NSNotification center singleton but is this the same for KVO?


Solution

  • No, there is no simple way that I'm aware of. KVO and NSNotification differs in that matter. Why don't you implement your solution with NSNotification instead of KVO if you need that functionality?