facebookarchive / KVOController

Simple, modern, thread-safe key-value observing for iOS and OS X.
Other
7.34k stars 925 forks source link

Add KVOController for self-observing: KVOControllerForSelf #131

Open k06a opened 7 years ago

k06a commented 7 years ago

Example:

[self.KVOControllerForSelf observe:self keyPath:FBKVOKeyPath(self.viewModel.name) options:options block:^(id _Nullable observer, id _Nonnull object, NSDictionary<NSString *, id> *_Nonnull change){
    // ...
}];

Sure we need to unobserve manually in dealloc.

k06a commented 7 years ago

@nlutsenko what do you think?