RACSignal *nameSignal = RACObserve(self, name);
RACSignal *messageSignal = RACObserve(self, message);
[[nameSignal zipWith:messageSignal] subscribeNext:^(id _Nullable x) {
NSLog(@"%@", x);
}];
self.name = @"zhangsan";
self.message = @"lisi";
self.message = @"lisi11";
输出
2018-06-05 18:32:03.763784+0800 racTest[17739:7491367] <RACTwoTuple: 0x604000204b80> (
"<null>",
"<null>"
)
2018-06-05 18:32:03.764353+0800 racTest[17739:7491367] <RACTwoTuple: 0x6000002054e0> (
zhangsan,
lisi
)
网友评论