felix
felix

Reputation: 11552

How to Make the KeyBoard Disappear while using a UITextView in iPhone

I am using a UITextView and I am confused about making the keyboard to disappear. Do I need to use some kind of a notification to make it disappear. Thanks

Upvotes: 0

Views: 3842

Answers (1)

Brandon Wood
Brandon Wood

Reputation: 5337

It's not very intuitive, but all you have to do is implement the doneButtonOnKeyboardPressed event in your view controller. You don't actually have to do anything inside of the event handler, just handling it will cause the keyboard to disappear after the user taps "Done".

An empty handler will look something like this:

- (IBAction) doneButtonOnKeyboardPressed:(id)sender {  
} 

Upvotes: 1

Related Questions