When the keyboard is showing on the iPhone\'s Messages app, if the user begins a swipe down from the messages tableview and continues into the keyboard area, the keyboard will b
I created a UIView category that provides the desired functionality:
https://github.com/danielamitay/DAKeyboardControl
Edit: It has indeed been used on the app store.
You can use UISwipeGestureRecognizer to do so. I don't know how to implement it using code, but if you are using the new xcode 4.2 beta then heres an easy method:
- (IBAction)dismiss:(id)sender;
Go to your view in your xib and set the class for you view to UIControl.
Drag and connect the UISwipeGestureRecognizer from the Library to your view.
Connect the IBAction (TouchDown) with the UISwipeGestureRecognizer.
Write the code to dismiss the keyboard:
- (IBAction)dismiss:(id)sender
{
[yourTextField resignFirstResponder];
}
Done!