iOS:MMDrawController:如何在viewcontroller的特定视图上禁用pangesture

时间:2016-12-21 12:30:56

标签: ios mmdrawercontroller residemenu

我已在我的应用中配置MMDrawControllerUITabBarControllerinitialviewcontroller

 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]];

    }];

然而,其中一个视图控制器具有无限滚动视图,当我在该特定视图控制器的无限滚动视图上滑动时,我想禁用MMDrawViewController的平移。目前,如果我在滚动视图上滑动,左侧平移将打开。我试过了becomeFirstresponder,它没有用。

0 个答案:

没有答案