Obscure a UITextField password Obscure a UITextField password ios ios

Obscure a UITextField password


Please set your UItextField property secure..

Try this..

textFieldSecure.secureTextEntry = true

textFieldSecure is your UITextField...


One can do this for Obscure a UITextField password:

enter image description here

CODE

Objective-C:

textField.secureTextEntry = YES;

Swift:

textField.isSecureTextEntry = true 


In Interface Builder check the "Secure Text Entry" checkbox

or

In code set:

Objective-C:

yourTextField.secureTextEntry = YES;

Swift:

yourTextField.secureTextEntry = true