I want to resign the keyboard from the text view as a first responder.I want as soon as user hits the return key after editing in a textView the keyboard should resign.But I am
Hope this code helps to you.
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { if ([text isEqualToString:@"\n"]) { [textView resignFirstResponder]; } return YES; }
use UITextViewDelegate protocol and yourTextViewName.delegate = self;