Ravindra Bagale Ravindra Bagale - 6 days ago 6
iOS Question

disable gesture recognizer only for particular view

on one viewController i have one mainView, on that view i have one another view (which is known as sidePanel view having frame 0,0,86,420.)I have added tapGesture. Now i want to just enable gesture recognition only for mainView other than sidePanelView.
see below image

enter image description here

i want to disable tapGesture for sidePanelView & enable for area other than it. How to do it.
(one thing i want to say area other than sidePanelView is parentView of sidePanelView).

Answer

I have did this,with help of

-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event

and in that i have checked for touch point location & according to touch location i did my work like this

if(points.x>86)
    {//hide the side panel
     }

It recognizes gestures with synchronize with events.

Comments