Reputation: 24767
I have a button on top of a GLKView. When i click on the button, i also receive a long touch notification on the GLKView that is behind the button.
How can i prevent the notification from propagating to the view?
Upvotes: 0
Views: 292
Reputation: 24767
Found the solution to my question. The following code will do the trick:
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
{
UIView* viewRceivingTouch = touch.view;
return (viewRceivingTouch == self.glkView);
}
Upvotes: 1