开发者

Forward touches to a view and cause UIGetureRecognizer to begin

Is there a way to forward touches to a subview which has a gesture recognizer attached, and that the forwarded even开发者_如何学Cts will initiate the gesture recognizer?


I got it to work with a little workaround (might not be suitable in all cases...).
Because UIGestureRecognizers get their events from the sendEvent method before UIViews do, I created a custom 'ForwarderGestureRecognizer' on the outer view and all this view does is to forward the events to the recognizers of the subview view when required.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜