I'm using the MFSideMenu from github link in my project. It's working, however I would like to disable it in a certain viewcontroller.
I added this in the viewcontroller but it doesn't disable the panMode:
#import "MFSideMenuContainerViewController.h"
-(void) viewWillAppear:(BOOL)animated {
MFSideMenuContainerViewController *sideMenu = [[MFSideMenuContainerViewController alloc] init];
sideMenu.panMode = 0;
}
my plan was then to re-enable the panmode in the viewDidDisappear method.
FYI in the MFSideMenuContainerViewController.m
file if I add self.panMode = 0;
to the - (void)setDefaultSettings {self.panMode = 0;}
it does disable the menu pan except it disables it for the entire app of course.
I must not be referencing the MFSideMenuContainerViewController
property panmode correctly.
in my AppDelegate:
.h
@property (nonatomic, strong) MFSideMenuContainerViewController *container;
.m
MFSideMenuContainerViewController *container = [MFSideMenuContainerViewController
containerWithCenterViewController:self.navController
leftMenuViewController:nil
rightMenuViewController:rightSideMenuController];
self.window.rootViewController = container;
thanks for any help
You can use this in viewWillAppear
.
[self.menuContainerViewController setPanMode:MFSideMenuPanModeNone];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With