tags:

views:

58

answers:

2

Why is it that there is no Did End On Exit property for a UITextView? How do you resignFirstResponder to lower the keyboard when the user clicks the 'Done' button? A UITextField usually works by just linking 'Did End On Exit' from UIBuilder but UITextView doesn't have that option.

A: 

There is textViewDidEndEditing: in the UITextViewDelegate protocol that will do what you need I believe.

Jesse Naugher
textViewDidEndEditing (and the other methods in that section of the delegate) are fired after, not before, textView was told to resign first responder.
DVG
A: 

Most apps solve this problem by adding a button somewhere in your UI. For instance in Safari, when you pop up the Keyboard on a UITextView, it brings a Toolbar with it with Previous, Next, autofill and a Done Button, and the Done button implements [myTextView resignFirstResponder];

DVG