Search code examples
iosuigesturerecognizerecslidingviewcontroller

Remove Gesture for view while Sliding Menu Activated


i'm using ECSlidingViewController and i've a problem when using pan Gesture to open the sliding menu the tableview in the main view still have the scrolling gesture

i need to remove the gesture of the main view and add it back when it slide back


Solution

  • in the InitViewController add the following method

    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{
        return NO;
    }
    

    if return YES it will make the undesirable behavior