0

enter image description here

After tapping Enter Password

Hi. I've wrote a code using fingerprint. When fingerprint fails you can tap "Enter Password" then Password textField will becomeFirstResponder(). My problem is here: when I tap that button it execute becomeFirstResponder() but keyboard turns transparent. And when you tap on the blank space bottom of Password textField it types characters like a normal keyboard. What should I do?

RajeshKumar R
  • 15,445
  • 2
  • 38
  • 70
p.yarandi
  • 59
  • 1
  • 11

1 Answers1

1

becomeFirstResponder() will not work in this case. Use:

yourTextField.perform(
            #selector(becomeFirstResponder),
            with: nil,
            afterDelay: 0.1
        )

Refer: becomeFirstResponder not working in iOS 8

Community
  • 1
  • 1
Arun Kumar
  • 34
  • 4