Last active
December 17, 2015 06:59
-
-
Save ashfurrow/5569942 to your computer and use it in GitHub Desktop.
Combining two signals.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[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