UITextField加密密文输入被清空的解决方案:
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
textField.text = [textField.text stringByReplacingCharactersInRange:range withString:string];
return NO;
}
网友评论