3

I have a loginViewController with Password Autofill feature. Everything works as it should except one small detail, which I cannot find a solution to. My conclusion is that there is none, but perhaps I could be wrong.

When the user selects a stored username and password, it autofills. But the keyboard stays open, and the user must dismiss the keyboard and press the log in button.

The documentation Password autofill workflow states that the delegate function:

  textField:shouldChangeCharactersInRange:replacementString:

is called, when an quickbar item is pressed. I would like to close the keyboard so that the user can immediately press the log in button, and proceed, after a password is selected. But in this delegate function its not possible since its called whenever the textfields are modified as well.

Is there any solution to do this?

Wolfgang
  • 132
  • 11
  • 2
    You would normally just handle the enter key on the keyboard as a login button rather than having the user dismiss the keyboard and have to tap a login button – Paulw11 Apr 27 '20 at 12:51
  • Found this: [link] (https://stackoverflow.com/questions/46391814/how-to-detect-when-user-used-password-autofill-on-a-uitextfield) – Wolfgang Apr 27 '20 at 12:56
  • @Paulw11 Fair enough, but link^ provided a solution for now. – Wolfgang Apr 27 '20 at 12:58

0 Answers0