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

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift