TouchDownGestureRecognizer simple implementation
- Import
TouchDownGestureRecognizer.h
into your ViewController.m
file - Get instance through
[[TouchDownGestureRecognizer alloc] initWithTarget: action:]
method - Add instance gesture recognizer to your view
- (void)viewDidLoad {
[super viewDidLoad];
TouchDownGestureRecognizer *touchDown = [[TouchDownGestureRecognizer alloc] initWithTarget:self action:@selector(handleTouchDown:)];
[self.view addGestureRecognizer:touchDown];
}
-(void)handleTouchDown:(UIGestureRecognizer *)gesture {
NSLog(@"Down");
}