In most cases, when I sign below, Ill checks to see if the value is nil first, for example:
[[RACObserve(self.viewModel, stockViewModel.stock.imageURL) takeUntil:[self takeUntil]] subscribeNext:^(id
value) {
@strongify(self);
//Check if not nil
if (value) {
//Do somthing
}
}];
Attached to do this every time, I try to change the category for RACSignal, which will transform this check for me, but I'm not sure how I can get the value (and not the value of the block, the next value) from this
- (RACDisposable *)subscribeNext:(void (^)(id x))nextBlock {
NSCParameterAssert(nextBlock != NULL);
RACSubscriber *o = [RACSubscriber subscriberWithNext:nextBlock error:NULL completed:NULL];
return [self subscribe:o];
}
Any help? Thank!
source
share