叉叉,原来是自带的,
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
if ([string isEqualToString:@""] && (range.length == 1 && range.location == 0)) {
self.mArrowBtn.hidden = YES;
self.nArrowBtn.hidden = YES;
return YES;
}
TTLog(@"%@",textField.text);
if (textField.text.length > 0 || string.length > 0) {
if (textField.tag == 10) {
self.mArrowBtn.hidden = NO;
}else{
self.nArrowBtn.hidden = NO;
}
}else{
self.mArrowBtn.hidden = YES;
self.nArrowBtn.hidden = YES;
}
return YES;
}