Skip to content

Instantly share code, notes, and snippets.

@engmsaleh
Created June 1, 2014 13:29
Show Gist options
  • Save engmsaleh/420ea8885668c9879cae to your computer and use it in GitHub Desktop.
Save engmsaleh/420ea8885668c9879cae to your computer and use it in GitHub Desktop.
This is how to dismiss iOS keyboard when click on UIView background
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
// dismiss keyboard when background is touched
[self.view endEditing:YES];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment