concat
RACStream
- (__kindof RACStream *)concat:(RACStream *)stream;
串联信号,组合信号按连接顺序依次执行,信号执行完后即刻返回。
zip
zip、zip reduce、zipWith
RACStream
+ (__kindof RACStream<ValueType> *)zip:(id<NSFastEnumeration>)streams;
+ (__kindof RACStream *)zip:(id<NSFastEnumeration>)streams reduce:(RACGenericReduceBlock)reduceBlock;
RACSignal
- (__kindof RACStream *)zipWith:(RACStream *)stream;
(+)zip:是把多个信号压缩成一个信号,当每个信号都有返回值时压缩成一个元组(RACTuple)返回,元组内值的顺序只与压缩顺序有关。
(+)zip:reduce:是在zip操作之后进行reduce操作。
(-)zipWith:用于连接两个信号。
then
RACSignal
- (RACSignal*)then:(RACSignal* (^)(void))block;
方法接受方信号执行完后,执行block中返回的信号,整个组合信号只返回then之后block中的信号中的值。
combineLatest
combineLatest、combineLatest reduce、combineLatestWith
+ (RACSignal<RACTuple *> *)combineLatest:(id<NSFastEnumeration>)signals;
+ (RACSignal<ValueType> *)combineLatest:(id<NSFastEnumeration>)signals reduce:(RACGenericReduceBlock)reduceBlock;
- (RACSignal *)combineLatestWith:(RACSignal *)signal;
combineLatest多个信号聚合成一个信号,原信号都有返回值时开始返回,之后每次原信号有返回时,返回所有原信号的最新值组成的元组。
combineLatest:reduce:是在combineLatest操作之后进行reduce操作。
combineLatestWith用来连接两个信号。
merge
RACSignal
+ (RACSignal<ValueType> *)merge:(id<NSFastEnumeration>)signals;
- (RACSignal *)merge:(RACSignal *)signal;
merge合并的信号在每当有信号返回值时便立即返回。
(+)merge:合并多个信号。
(-)merge:连接两个信号。
网友评论