how does addObserver: works under the hood ? Since Objective C can’t overload operators…
Are class @properties, or object references stored implicitly in a NSDictionary, which can monitor value access ? Or how can cocoa observe values ?
And especially when we write the getter and setter of property by ourself,
how does the observer notification happen?
The KVO mechanism creates subclasses at runtime and overrides the observed setter methods.
This excellent article of Mike Ash explains how it is implemented.