Created
September 25, 2012 18:55
-
-
Save prabirshrestha/3783736 to your computer and use it in GitHub Desktop.
dismiss ios keyboard on tap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // in view did load | |
| UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)]; | |
| tapGestureRecognizer.cancelsTouchesInView = NO; | |
| [self.tableView addGestureRecognizer:tapGestureRecognizer]; | |
| - (void)dismissKeyboard { | |
| [self.view endEditing:YES]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment