PDA

View Full Version : How do I close the keyboard




iphonedevelop18
Mar 16, 2009, 03:53 PM
Say I have a text field and I open the keyboard up by clicking on it, how then do I close the keyboard as there are buttons underneath that need to be pushed.



dejo
Mar 16, 2009, 05:37 PM
Please read the iPhone Application Programming Guide first.

yayaba
Mar 16, 2009, 06:25 PM
You need to assign the UITextField's delegate to whatever is the parent of the UITextField. Then use the delegate function that corresponds to whether or not to use the Return key and in that function return YES and resign the first responder.

I'm not 100% sure of the concept of first responders though, I just know it needs to be done...