doNext:
执行Next之前,会先执行这个Block
doCompleted:
执行sendCompleted之前,会先执行这个Block
- (void)doNext { [[[[RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) { [subscriber sendNext:@1]; [subscriber sendCompleted]; return nil; }] doNext:^(id x) { //执行[subscriber sendNext:@1];前,会调用这个block NSLog(@"doNext"); }] doCompleted:^{ //执行[subscriber sendCompleted];前,会调用这个block NSLog(@"doCompleted"); }] subscribeNext:^(id x) { NSLog(@"%@", x); }]; }