1创建信号
RACSignal *signal = [RACSignal createSignal:^RACDisposable *(id<RACSubscriber> subscriber) {
NSLog(@"发送热门模块");
[subscriber sendNext:@"热门模块的数据"];
return nil;
}];
2把信号转换成连接类
RACMulticastConnection *connection = [signal publish];
3订阅连接类的信号
[connection.signal subscribeNext:^(id x) {
NSLog(@"订阅者1%@",x);
}];
[connection.signal subscribeNext:^(id x) {
NSLog(@"订阅者2%@",x);
}];
[connection.signal subscribeNext:^(id x) {
NSLog(@"订阅者3%@",x);
}];
4连接
[connection connect];