How to make UITextView “Done” button resignFirstResponder?

Check the following: Is UITextViewDelegate specified in . H Implement delegate method for uitextview: textViewShouldEndEditing, return YES make sure your . M (controller) is the delegate for uitextview in IB resignFirstResponder should now work.

This should work. Have done it in some of my apps... – Gabaum10 Oct 20 '10 at 17:21.

I was trying to do something similar, then quickly realized the user would need the "return" key for entering blank lines between paragraphs. I noticed that gmail in safari on the iphone has a done button above the keyboard which looks quite nice.

The accepted answer didn't work for me. Instead, the following delegate method should be invoked like this: - (BOOL) textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text { if(text isEqualToString:@"\n"){ textView resignFirstResponder; return NO; }else{ return YES; } } Paste that into the class that you assign to be the UITextView delegate and it'll work.

I am trying to make my editable UITextView resign the keyboard (resignFirstResponder) when the user taps "Done." However, with a UITextView, I can't seem to access the "Did End on Exit" action. Any suggestions on how to make this happen?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions