Created
December 15, 2013 21:59
-
-
Save rizumita/7978754 to your computer and use it in GitHub Desktop.
ReactiveCocoaでKVOの新旧の値を受け取る
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[object rac_valuesAndChangesForKeyPath:@keypath(object, keypath) options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld observer:nil] subscribeNext:^(RACTuple *tuple) { | |
NSDictionary *changeDictionary = tuple.second; | |
if (![changeDictionary[@"new"] isEqualToNumber:changeDictionary[@"old"]]) { | |
} | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment