rac 监听textFeild文本改变

[[RACSignal merge:@[self.textfield.rac_textSignal, RACObserve(self.textfield, text)]] subscribeNext:^(NSString* text){
            @strongify(self);
            NSString * ss = [text stringByReplacingOccurrencesOfString:@" " withString:@""];
            self.saveBtn.enabled = ss.length>0;
        }];

 

你可能感兴趣的:(OC)