Skip to content

Instantly share code, notes, and snippets.

@nic004
Created March 5, 2018 11:56
Show Gist options
  • Save nic004/860525c616fa389709d44993cc9a463b to your computer and use it in GitHub Desktop.
Save nic004/860525c616fa389709d44993cc9a463b to your computer and use it in GitHub Desktop.
phone number verification without Reactive #4
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