UITapGestureRecognizer w/multiple touches issue?
I'm wondering if anybody else has had problems with setting up a UITapGestureRecognizer with multiple touches (NOT multiple taps). If I set the number of touches to 1 everything works pretty well. If I set the number of touches to 2 the recognizer is triggered about 80% of the time. If I set the number of touches开发者_Go百科 to 3 then it's triggered about 10% of the time. I'm attaching the recognizer to a UIWebView. I've even tried messing around with delaysTouchesBegan/End to see if that helps things. Anyone have any suggestions on how to make 2 and 3 touches work more reliably?
Copied from the comment above:
I've figured it out. When I add the following delegate method:
-(BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return( YES );
}
Everything starts working like a champ. – rforte 2 days ago
精彩评论