 <p>tyr only one line add in below:</p> <pre><code>func textFieldDidBeginEditing(textField: UITextField) { if textField == userNameTextField { textField.resignFirstResponder() // this line add pickerUser.hidden = false print("userNameTextField") } else { pickerUser.hidden = true print("@userPasswordTextField") } } </code></pre>