0

In my code I'm using one of the UITextFieldDelegate methods to detect when a textfield has been left so I can do a check and alert the user.

The first check is the amount of characters they have type into the textfield.

Here is my code:

override func textFieldDidEndEditing(textField: UITextField!) {
    if textField == self.signUpView.usernameField {
        if textField.text.length // this doesn't work
    }

    if textField == self.signUpView.passwordField {

    }

    if textField == self.signUpView.emailField {

    }

}

How is this done in swift?

LondonGuy
  • 10,778
  • 11
  • 79
  • 151

0 Answers0