ios remove keyboard

ghiboz picture ghiboz · Jan 21, 2011 · Viewed 10.5k times · Source

I have some text edit fields, and also a button to show a uidatepicker.. if I go to the uitextedit, the keyboard appears, but when I click the button, the keyboard is still here... how can I remove it?

thanks!

Answer

WrightsCS picture WrightsCS · Jan 21, 2011

You need to use resignFirstResponder, see this similar question.

[myTextField resignFirstResponder];