ignore
RACSubject *subject = [RACSubject subject];
//忽略一些值
//RACSignal *signal = [subject ignore:@"1"];// 忽略为1 值
//RACSignal *signal = [[subject ignore:@"1"] ignore:@"2"];
RACSignal *signal = [subject ignoreValues]; //忽略所有
[signal subscribeNext:^(id _Nullable x) {
NSLog(@"%@",x);//忽略信号为1、2的
}];
//发送
[subject sendNext:@"1"];
[subject sendNext:@"2"];
[subject sendNext:@"3"];
网友评论