私のテスト例を確認してください。それがあなたを助けることを願っています
RACSignal *signal1 = [RACSignal error:nil];
RACSignal *signal2 = [RACSignal error:nil];
RACSignal *signal3 = [RACSignal error:nil];
RACSignal *signal4 = [RACSignal return:@5];
NSArray<RACSignal *> *signals = @[signal1,
signal2,
signal3,
signal4];
NSMutableArray<RACSignal *> *catchedSignals = [NSMutableArray array];
[signals enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(RACSignal * _Nonnull signal, NSUInteger idx, BOOL * _Nonnull stop) {
RACSignal *catchedSignal = signal;
if (idx != signals.count-1) {
catchedSignal = [signal catchTo:catchedSignals.firstObject];
}
[catchedSignals insertObject:catchedSignal atIndex:0];
}];
[catchedSignals.firstObject subscribeNext:^(id x) {
//print 5
NSLog(@"x = %@", x);
}];