Created
March 5, 2018 11:56
-
-
Save nic004/860525c616fa389709d44993cc9a463b to your computer and use it in GitHub Desktop.
phone number verification without Reactive #4
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
override func viewDidLoad() { | |
super.viewDidLoad() | |
phoneNumberTextField.addTarget(self, action: #selector(phoneNumberEditingChanged), for: .editingChanged) | |
} | |
func phoneNumberEditingChanged(_ textField: UITextField) { | |
requestVerifyNumberButton.isEnabled = !(textField.text?.isEmpty ?? true) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment