- (BOOL)textField:(UITextField*)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString*)string
{
NSString*tem = [[stringcomponentsSeparatedByCharactersInSet:[NSCharacterSetwhitespaceCharacterSet]]componentsJoinedByString:@""];
if(![stringisEqualToString:tem]) {
return NO;
}
return YES;
}
网友评论