I create a simple project: https://github.com/edzio27/textFieldExample.git
where I add two UITextFields, one with login and second one with secure passw
Set your delegate of your TextField and add this;
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
if (!textField.secureTextEntry) {
return YES;
}
textField.text = [textField.text stringByReplacingCharactersInRange:range withString:string];
if (textField.text.length > 0) {
textField.font = [UIFont systemFontOfSize:18.0f];
} else {
textField.font = [UIFont fontWithName:@"YourFont" size:18.0f];
}
return NO;
}