MFSideMenu icon indicating copy to clipboard operation
MFSideMenu copied to clipboard

How can I disable PanMode some specific area?

Open HemalAsanka opened this issue 11 years ago • 2 comments

I have to a view controller and I need to enable pan mode in it. I did it like this -(void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; self.menuContainerViewController.panMode=MFSideMenuPanModeDefault;//enable pan mode only rootview controller } But I need to add UISlider on that view controller. So I want to disable pan mode on only that area. Otherwise UISlider not work on smoothly. How can I do that?

HemalAsanka avatar May 02 '14 05:05 HemalAsanka

@HemalAsanka unfortunately right now there is not a great way to do this.

mikefrederick avatar Aug 09 '14 21:08 mikefrederick

I solved the issue with UISliders this way:

In MFSideMenuContainerViewController.m find the method with the signature.

(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch

Add the following at the beginning.

    if ([touch.view isKindOfClass:[UISlider class]]) {
        return NO;
    }

and you are Golden!

bendigi avatar Jun 23 '15 21:06 bendigi