- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)textstring
{it
NSMutableString * futureString = [NSMutableString stringWithString:textView.text];io
[futureString insertString:text atIndex:range.location];table
NSInteger flag=0;im
const NSInteger limited = 2;tab
for (int i = futureString.length-1; i>=0; i--) {co
if ([futureString characterAtIndex:i] == '.') {return
if (flag > limited) {location
[SVProgressHUD showInfoWithStatus:@"最多輸入兩位"];ab
return NO;
}
break;
}
flag++;
}
return YES;
}