mikefrederick / MFSideMenu

Facebook-like side menu for iOS
Other
1.17k stars 291 forks source link

How can i disable opening left OR right controller dynamically? #154

Closed andwhy closed 10 years ago

andwhy commented 10 years ago

I can implement [_container setRightMenuViewController:nil]; but how can i do it in dynamic? Or maybe better disable pan recognizer for only one gesture(swipe right for example)? Can i do something in library bounds? Thanks

andwhy commented 10 years ago

I want to disable right slide on one screen and enable it on other

mikefrederick commented 10 years ago

@andwhy you can disable panning in viewWillAppear, and re-enable it in viewWillDisappear.

// enable panning on the center view controllers & the side menus (this is the default behavior):
menuContainerViewController.panMode = MFSideMenuPanModeCenterViewController | MFSideMenuPanModeSideMenu;

// disable all panning
menuContainerViewController.panMode = MFSideMenuPanModeNone;
siggb commented 10 years ago

For dynamically disabling opening check this Q/A: https://github.com/mikefrederick/MFSideMenu/issues/57