标签:
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
NSRange last = [_borMoneyTextField.text rangeOfString:@"."];
long digit = range.location - last.location;
if (digit > 1) {//保留一位小数
return NO;
}
}
标签:
原文地址:http://www.cnblogs.com/zhangwu/p/4645318.html