开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜