RAC zipWith

    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] (
"",
""
)
2018-06-05 18:32:03.764353+0800 racTest[17739:7491367] (
zhangsan,
lisi
)

你可能感兴趣的:(RAC zipWith)