Last active
December 15, 2015 20:09
-
-
Save danmartyn/5316466 to your computer and use it in GitHub Desktop.
This file contains 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
// Create a UITapGestureRecognizer and add it to the view | |
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)]; | |
tap.cancelsTouchesInView = NO; | |
[self.view addGestureRecognizer:tap]; | |
// In the handleTap Method add | |
- (void)handleTap:(UITapGestureRecognizer *)tap | |
{ | |
[self.view endEditing:YES]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment