I'm using UIGestureRecognizer
to capture taps... if I don't want to process a particular tap, the manuals says:
"If a gesture recognizer detects a touch that it determines is not part of its gesture, it can pass the touch directly to its view. To do this, the gesture recognizer calls ignoreTouch:forEvent: on itself, passing in the touch object."
Unfortunately, I can't find any example of using this. This is my code in the UIGestureRecognizer
handler:
- (void)singleFingerTap:(UITapGestureRecognizer*)gesture {
CGPoint pt = [gesture locationInView:self.view];
CGRect dataRect = CGRectMake(117.0,416.0,670.0,1450);
CGPoint dataPoint = CGPointMake(pt.x, pt.y);
// check to see if point is within the rectangle
if(!CGRectContainsPoint(dataRect, dataPoint)) {
NSLog(@"\n\nNOT within subViewData (x: %f y: %f",dataPoint.x, dataPoint.y);
[self.view ignoreTouch:gesture];
}
else {
NSLog(@"\n\nIS within subViewData(x: %f y: %f",dataPoint.x, dataPoint.y);
}
}
I keep getting an error:
No visible @interface for 'UIView' declares the selector 'ignoreTouch:'
I have read the App docs and they have what I quoted; nothing on SO or Google that answers this question. Help is very much appreciated (as usual). :D