NSString *temptext = [messageTextField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];//去除两端的空格
NSString *inputStr = [textField.text stringByReplacingOccurrencesOfString:@" " withString:@""]; //去除所有
NSString *temptext = [messageTextField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];//去除两端的空格
NSString *inputStr = [textField.text stringByReplacingOccurrencesOfString:@" " withString:@""]; //去除所有