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
try this line:
@IBAction func btnClick(sender: AnyObject) { let btn : UIButton = sender as! UIButton if btn.tag == 0{ btn.tag = 1 textFieldSecure.secureTextEntry = NO } else{ btn.tag = 0 textFieldSecure.secureTextEntry = NO; } }