Last active
August 29, 2015 14:08
-
-
Save bobspryn/8a019580d7a3fc829746 to your computer and use it in GitHub Desktop.
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
- (void)textFieldDidChange:(UITextField *)sender { | |
// update the view-model | |
self.viewModel.username = sender.text; | |
// check if things are now valid | |
self.goButton.enabled = self.viewModel.isUsernameValid; | |
self.goButton.alpha = self.viewModel.isUsernameValid ? 1.0 : 0.5; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment