Created
October 24, 2014 19:14
-
-
Save rodericj/070b33e5e17626df0a9b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 *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