Reputation: 31
I am doing the following code:
[RACObserve(obj, property) subscribeNext:^(id x) {
NSLog(@"property was changed");
}];
obj.property = @"bla";
This code call the block twice, one at subscription time and one when the property is modified. I want the block be called only when the property is modified. Is there any way this behavior can be avoided with reactivecocoa?
Upvotes: 3
Views: 405
Reputation: 6489
Use the -skip:
operator to prevent the subscriber from getting called with the property's initial value.
Upvotes: 6