美文网首页
RAC zipWith

RAC zipWith

作者: 淡燃 | 来源:发表于2018-06-05 18:33 被阅读0次
        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
    )

    相关文章

      网友评论

          本文标题:RAC zipWith

          本文链接:https://www.haomeiwen.com/subject/wcymsftx.html