I have a simple scene (using storyboard in IB) with a Username and Password text box. I\'ve set the keyboard to close when you are on the Password text field but can\'t get
The swift version could be:
extension LoginViewController: UITextFieldDelegate {
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
if textField == self.emailTextField {
passwordTextField.becomeFirstResponder()
} else if textField == self.passwordTextField {
passwordTextField.resignFirstResponder()
}
return true
}
}