I currently have a UITextfield with an eye icon in it that when pressed is supposed to toggle the secure text entry on and off.
UITextfield
I know you can che
Here is your answer no need to take any bool var:
@IBAction func showHideAction(sender: AnyObject) { if tfPassword.secureTextEntry{ tfPassword.secureTextEntry = false }else{ tfPassword.secureTextEntry = true; } }