Password hide show on Eye Button click

PHOTO EMBED

Wed Jul 05 2023 05:32:27 GMT+0000 (Coordinated Universal Time)

Saved by @hasnat #ios #swift #eye #password #hide #show

@IBAction func eyeButtonPressed(_ sender: Any) {
        if passwordTextField.isSecureTextEntry == false {
            passwordTextField.isSecureTextEntry = true
            eyeImageView.image = UIImage(systemName: "eye.slash")
        } else {
            passwordTextField.isSecureTextEntry = false
            eyeImageView.image = UIImage(systemName: "eye")
        }
        eyeImageView.setImageColor(color: UIColor.gray)
    }
content_copyCOPY