masked the pasword input to UITexfield

Posted by user262325 on Stack Overflow See other posts from Stack Overflow or by user262325
Published on 2010-04-20T08:07:34Z Indexed on 2010/04/20 8:13 UTC
Read the original article Hit count: 232

Filed under:

Hello everyone

I hope to mask the text input to UITextFiled as:

"ABCDE" to
"*****"

below are my codes without function

- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
   int l=[textField.text length];
   range=NSMakeRange(1, l );
   string=[[[NSString alloc]initWithString:@"*"] autorelease];
   return YES;
}

Welcome any comment

Thanks interdev

© Stack Overflow or respective owner

Related posts about iphone