Created
September 18, 2013 05:18
-
-
Save warriorg/6604847 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
//The setup code (in viewDidLoad in your view controller) | |
UITapGestureRecognizer *singleFingerTap = | |
[[UITapGestureRecognizer alloc] initWithTarget:self | |
action:@selector(handleSingleTap:)]; | |
[self.view addGestureRecognizer:singleFingerTap]; | |
[singleFingerTap release]; | |
//The event handling method | |
- (void)handleSingleTap:(UITapGestureRecognizer *)recognizer { | |
CGPoint location = [recognizer locationInView:[recognizer.view superview]]; | |
//Do stuff here... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment