views:

57

answers:

1

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!

A: 

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

Shaji
I was able to use that to detect when the keyboard left. By putting the textfield should return code in the keyboard hide code, it called it either way. Then it would call textfielddidendediting code. Thanks!
SolidSnake4444