Open GaryHomewood opened 10 years ago
hey. just ran into this problem. check this property. maybe it helps.
[drawerController setOpenDrawerGestureModeMask:MMOpenDrawerGestureModePanningNavigationBar]
I've tried both, but it doesn't seem to work.
+1 any clean solution for this?
I found a solution for this:
Will work for those who only use LEFT pane and Center Pane.
[[self.navigationController mm_drawerController] setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeCustom];
__weak typeof(self)weakSelf = self;
[[self.navigationController mm_drawerController] setGestureShouldRecognizeTouchBlock:^BOOL(MMDrawerController *drawerController, UIGestureRecognizer *gesture, UITouch *touch) {
if ([gesture isKindOfClass:[UIPanGestureRecognizer class]])
{
BOOL myView = [weakSelf checkSelfSuperview:touch.view];
if (myView)
{
return NO;
}
}
return YES;
}];
- (BOOL)checkSelfSuperview:(UIView *)view
{
if (view == self.view)
return YES;
else if (view.superview == nil)
return NO;
else
{
return [self checkSelfSuperview:view.superview];
}
}
@jonasman Jonas, From a newbie, where do you place those two pieces of code? Desperate to find a fix to this.
Thank you!!
@mark22 this was 2 years ago. I guess you need to add this to some viewcontroller that uses the lib. Maybe some root VC
I am trying to to allow swipe left to delete for a table view in the centre view controller.
I am implementing the UIGestureRecognizerDelegate and I have the following, which only works occasionally:
Any ideas?