Thursday, September 26, 2013

UIGestureRecognizer gesture doubts

Consult Great God, I view adds gesture, but click on the buttom view also responds to gestures, buttom did not execute the click event, and this how to do it? I hope that gestures do not affect the view buttom click event, how can we solve it

Reply:
There is such a situation, if I were to click gesture btn also added the words, btn, click gesture will overwrite the view, click gestures. . . If the view there are other gestures, it will still be applied to the btn, I feel good here tangled ah
Reply:
I have encountered this problem, you can do to achieve gesture proxy method, to determine what types of gestures. .
Reply:
You can click on the coordinates of the point of view to get the type of judgment is not a button, remove the line
Reply:
Oh there way to achieve gesture delegate, you can determine if it is btn type, do not realize gesture, then btn click event will be able to enter into force. Still thank ah

No comments:

Post a Comment