Password textfield have shown option with automatic paste option Not able to type on textfield iOS swift

 Problem:

Password textfield have shown option with automatic paste option with yellow color.After that not able to type on textfield .How to solve that?

Solution:

You can easily solve that by using the below code.

extension UITextField {

    func removePasswordOverlay() {

        if #available(iOS 10.0, *) {

            if #available(iOS 12, *) {

                textContentType = .oneTimeCode

            } else {

                textContentType = UITextContentType(rawValue: "")

            }

        }

    }

}


You can call the above extension as like below.

        passwordTF.removePasswordOverlay()

Comments

Popular posts from this blog

store cgpoint in userdefaults iOS swift

libc++abi: terminating due to uncaught exception of type NSException iOS swift