views:

48

answers:

3

i am trying to do the login form i have created two uitextfields for username ,password and one uibutton for login. when i enter password in password textfield i want to display all the text as '*' or any special characters like in the following images

alt text alt text

is there any default ways in sdk to do this or we have to do it logically if any give me some sample codes. Thanks in advance

+1  A: 

You can use [myTextField setSecureTextEntry:YES] which is part of the UITextInputTraits protocol whom UITextField adhere.

Don't know of a "free" way to change the secure character, though.

Eric MORAND
+3  A: 

The UITextInputField conforms to the UITextInputTraits protocol, which means you can use the following to tell it to display "*"s:

[passwordTextInputField setSecureTextEntry:YES];
John Franklin
+2  A: 

Open you NIB-File in Interface-Builder, mark your UITextField and open the Inspector (Tools > Inspector). In the very left Tab (Attributes) set the value of "Secure" to TRUE.

See the Screenshot below:

alt text

Programmaticaly you can use the following line of Code:

password.secureTextEntry = TRUE

Where password is your UITextField.

audience