Heres The Problem: I want to test the TapGestureRecognizer with an NSLog but the TapGestureRecognizer functions anywhere except in the UIWebView and I have no idea why…
Heres My Code:
-(void)viewDidLoad {
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(bookmarker:)];
tapGesture.numberOfTapsRequired = 2;
[self.view addGestureRecognizer:tapGesture];
[tapGesture release];
}
Heres The IBAction:
-(IBAction)bookmarker:(UITapGestureRecognizer *)trecognizer{
NSLog(@"TAPPED");
}
This is the view I want it to function in:
https://i.stack.imgur.com/3UPor.png
And this is the view it functions in:
https://i.stack.imgur.com/nGmwq.png
(Sorry with less than 10 rep points I can’t post pics )
I found out webviews don’t accept TapGestureRecognizer because it has its own set of gestures so to implement it:
in Header make UIGestureRecognizer delegate
(in viewDidLoad)
Then implement: