How to hide the keyboard programmatically in iphone?
Tell the UIResponder subclass that is currently first responder to resign its first responder status:
[responder resignFirstResponder];