This would send @YES
every time self.recording
's value changes to YES
, and ignore any NO
s:
RACSignal *mySignal = [RACObserve(self, recording) ignore:@NO];
This would skip the initial value, regardless of whether it's NO
or YES
, and would send every subsequent value (either NO
or YES
):
RACSignal *mySignal = [RACObserve(self, recording) skip:1];
You can achieve more fine-grained control over how ReactiveCocoa KVOs your property using NSKeyValueObservingOptionNew
to only send a value if the property gets set to a new (not the initial) value:
RACSignal *mySignal = [self rac_valuesAndChangesForKeyPath:@"recording"
options:NSKeyValueObservingOptionNew
observer:self];