背景:苹果自带键盘输入英文时,中间会有“空格”。
解决方法:“空格”的字符为“8198”。
NSString *checker = [NSString stringWithFormat:@“%C”, 8198];
if ([textField.text rangeOfString:checker].length) {
textField.text = [textField.text stringByReplacingOccurrencesOfString:checker withString:@""];
}
原文链接:https://blog.csdn.net/q1194259339/article/details/80491653/@TOC