Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPad "dismiss keyboard" button (lower right), how do I detect when this occurs? What function tells me it was pressed?

Tags:

I have an ipad app that when you are in landscape view, the view will move up when the keyboard is brought in. When you press done on the keyboard, textFieldShouldReturn and textFieldShouldEndEditing are called in which case, I move the view down in shouldEndEditing.

If the user presses the dismiss keyboard button, the keyboard does poof, yet the view is still stuck floating where I moved it.

I need to know how or what function is called when that button is pressed so I can redirect the function to textFieldShouldEndEditing.

Thanks!

like image 593
SolidSnake4444 Avatar asked Jun 25 '10 19:06

SolidSnake4444


People also ask

How do I dismiss my IPAD keyboard?

The lower right corner of the keyboard has a key with a representation of a keyboard with a down arrow. Press that key.

Where is hide keyboard key on IPAD?

When you're in an editing window, tap the Down Arrow key on your Magic Keyboard. Next, touch and hold the downward-facing chevron in the bottom-right corner of the screen until the onscreen keyboard appears. To hide the virtual keyboard again, tap the key in the bottom-right corner of the screen.


1 Answers

You can listen for keyboard hide UIKeyboardWillHideNotification notification.

Example code is here http://developer.apple.com/iphone/library/samplecode/KeyboardAccessory/Listings/Classes_ViewController_m.html

like image 96
Sharjeel Aziz Avatar answered Oct 11 '22 08:10

Sharjeel Aziz