iOS: MMDrawController: How to disable pangesture on specific view of viewcontroller

722 Views Asked by At

I have configured MMDrawController in my application which has UITabBarController as initialviewcontroller.

 self.drawerController = [[MMDrawerController alloc] initWithCenterViewController:self.rootTabBarController leftDrawerViewController:leftSideNavigationController];
   self.drawerController.openDrawerGestureModeMask = MMOpenDrawerGestureModePanningCenterView;
    self.drawerController.closeDrawerGestureModeMask = MMCloseDrawerGestureModePanningCenterView;

    [self.drawerController setGestureShouldRecognizeTouchBlock:^BOOL(MMDrawerController *drawerController, UIGestureRecognizer *gesture, UITouch *touch) {

        if ([gesture isKindOfClass:[UITapGestureRecognizer class]]) {
            return FALSE;
        }

        return !([touch.view isKindOfClass:[UISlider class]]) && !([touch.view isKindOfClass:[UIScrollView class]]) && !([touch.view isKindOfClass:[ADNetworkFeedDropdownView class]]) && [gesture isKindOfClass:[UIPanGestureRecognizer class]];

    }];

However one of the viewcontroller has infinite scrollview, when I swipe on infinite scrollview of that specific viewcontroller I want to disable pan of MMDrawViewController. Currently, Left pan opens up if I swipe on the scrollview. I tried becomeFirstresponder, Its not working.

0

There are 0 best solutions below