Hi,
I need to create a Login View.For this I need a TextField for entering Password.
He is my code below.
Code:
- (UITextField *)createPasswordTextField
{
CGRect frame = CGRectMake(0.0, 0.0, TEXTFIELDWIDTH, TEXTFIELDHEIGHT);
UITextField *returnTextField = [[UITextField alloc] initWithFrame:frame];
returnTextField.borderStyle = UITextBorderStyleBezel;
returnTextField.textColor = [UIColor blackColor];
returnTextField.font = [UIFont systemFontOfSize:17.0];
returnTextField.placeholder = @"<enter password>";
returnTextField.secureTextEntry = YES;
returnTextField.backgroundColor = [UIColor whiteColor];
returnTextField.keyboardType = UIKeyboardTypeDefault;
returnTextField.returnKeyType = UIReturnKeyDone;
returnTextField.clearButtonMode = UITextFieldViewModeWhileEditing; // has a clear 'x' button to the right
return returnTextField;
}
But with this approach when entering Password the newly enterd character is visble i.e like if we enter "sap" then it appears as "**p|".
Any suggestion would be helpful.
Thanks
Satya