Anyway to disable pan on a viewcontroller
donpironet opened this issue · 6 comments
Is there any way to disable the menu on a particular viewcontroller?
Hi @donpironet.
Sorry for the delay.
You can easily disable the menu by setting his leftPanelOpenGestureMode
(or rightPanelOpenGestureMode
) property to MSSPOpenGestureModeNone
in the viewWillAppear:
of your controller. Don't forget to set the initial value in viewWillDisappear:
!
Does it fix your issue?
How can I access the leftPanelOpengestureMode from my ViewController? Thanks for your help btw :)
You have to import MSViewControllerSlidingPanel.h
and to call self.slidingPanelController
: that's it!
Thanks for your help. I've now this:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
_filterPanel = self.slidingPanelController.leftPanelOpenGestureMode;
self.slidingPanelController.leftPanelOpenGestureMode = MSSPOpenGestureModeNone;
} - (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
self.slidingPanelController.leftPanelOpenGestureMode = _filterPanel;
}
and still when I'm on that view controller I can pan the left controller open. Any idea what I'm doing wrong?
Your example seems correct. Did you check if self. slidingPanelController
is nil
?
Your right, my slidingPanelController is nil. I think I know why. Thanks for all your help :)