Basically UITextView is for Multi line Text. However if you want to hid the keyboard when the user presses the Return Key using the following snippet:
- -(BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString*)text
- {
- if([text isEqualToString:@"\n"])
- {
- [textView resignFirstResponder];
- returnNO;
- }
- returnYES;
- }