Created
March 9, 2013 19:47
-
-
Save C4Code/5125479 to your computer and use it in GitHub Desktop.
Simple test of TAP gesture. All gestures are set, by default, to delay the touchesBegan method in the object to which they are attached. Uncomment lines 4 and 5 to see the difference.
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
@implementation C4WorkSpace | |
-(void)setup { | |
[self addGesture:TAP name:@"tap" action:@"tapped"]; | |
//UIGestureRecognizer *g = [self gestureForName:@"tap"]; | |
//g.delaysTouchesBegan = NO; | |
} | |
-(void)tapped { | |
C4Log(@"Called when the gesture recognizes a tap"); | |
} | |
-(void)touchesBegan { | |
C4Log(@"Called only if g.delaysTouchesBegan == NO"); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment