Skip to content

Instantly share code, notes, and snippets.

@ashfurrow
Last active December 17, 2015 06:59
Show Gist options
  • Save ashfurrow/5569942 to your computer and use it in GitHub Desktop.
Save ashfurrow/5569942 to your computer and use it in GitHub Desktop.
Combining two signals.
[[RACSignal
combineLatest:@[self.firstNameField.rac_textSignal, self.lastNameField.rac_textSignal]
reduce:^(NSString *firstName, NSString *lastName){
return @(firstName.length > 0 && lastName.length > 0);
}] toProperty:@"enabled" onObject:self.button];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment