Skip to content

Instantly share code, notes, and snippets.

@rodericj
Created October 24, 2014 19:14
Show Gist options
  • Save rodericj/070b33e5e17626df0a9b to your computer and use it in GitHub Desktop.
Save rodericj/070b33e5e17626df0a9b to your computer and use it in GitHub Desktop.
RACSignal *emailTextFieldHoldsEmail = [self.textField.rac_textSignal map:^id(id value) {
return @([value isEmail]);
}];
RAC(self.sendButton, enabled) = emailTextFieldHoldsEmail;
RAC(self.sendButton, alpha) = [emailTextFieldHoldsEmail map:^id(id value) {
return [value boolValue] ? @1 : @.5;
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment