|
|
|
|
|
by kimon
4497 days ago
|
|
This is a useful collection of links. One point of note, Facebook's solution doesn't rely on swizzling. Much like THObserversAndBinders, KVOController ties observation to the controller scope. We use a shared controller instance, that acts as a receptionist for all KVO notifications, as well as a weak reference to the observer, in order to safely allow observer removal on dealloc. |
|
https://github.com/facebook/KVOController#usage
By controller does the readme refer to the KVOController instance? I assume this is a property on the class that uses it, and once the class gets dealloced, its observer also get dealloced? FBKVOController
Hmm... I think this is a much better idea! Much cleaner than what I current got going, but then again we don't offer the same api. Thanks for correcting me!