Take the 2-minute tour ×  I am trying to hide the keyboard in my
SplitView application (because it covers over part of the root
menu). However, the only thing I can find is how to hide the
keyboard after a textfield has been used [TextField
resignFirstResponder].  Is there any other way to hide the
keyboard? Ideally I would like to use the barButtonItem, which
displays the menu, as a trigger to hide the keyboard.
share|improve this question add comment  3 Answers  up vote 6
down vote accepted  Use this:  [[[UIApplication
sharedApplication] keyWindow] endEditing:YES]; share|improve
this answer exactly what I was looking for, works perfectly ! – 
BloonsTowerDefence Aug 15 '12 at 18:15 add comment  You need to
send the -resignFirstResponder message to the instance of
whatever UI element currently has first responder status. So if
there were a firstNameTextField property on your class that
corresponds to an instance of UITextField, you need to send the
message to that object.  [self.firstNameTextField resignFirs