How does Cocoa: addObserver work under the hood?

how does addObserver: work addObserver: under the hood? Since Objective-C cannot overload operators ...

Are @properties classes, or are object references stored implicitly in an NSDictionary that can control access to values? Or how can cocoa observe the meanings?

And especially when we ourselves record the getter and property setter, how does the observer notice?

+4
source share
1 answer

The KVO engine subclasses at run time and overrides observable customization methods. This excellent article by Mike Ash explains how this is implemented.

+6
source

Source: https://habr.com/ru/post/1387011/


All Articles