- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range
replacementText:(NSString *)text
{
if([text isEqualToString:@" "]){
[self.textView endEditing:YES];
[self whenTheTextViewEndEditing];
return NO;
}