0

I am using MMDrawerController for making left slide menu in iOS. The problem is that all the view controllers I am using in this project are having slider with them i.e in each UIViewController I can slide to get left menu but I want only with the first view not with all the UIViewController.

How can I stop slider code for the other UIViewController in the project.

Peter Lewerin
  • 13,140
  • 1
  • 24
  • 27
person
  • 123
  • 8

2 Answers2

0

you can cancel panning using below method. put that method in viewWillAppear

To allow gesture add this in viewWillAppear

[self.mm_drawerController setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll];

when you push any view cancel gesture using below code.

[self.mm_drawerController setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeNone];
ChintaN -Maddy- Ramani
  • 5,156
  • 1
  • 27
  • 48
  • I Imported MMDrawerController in the View Controller in which I want to use and I added the code in the ViewWillAppear method MMDrawerController * drawer; self.drawer = [[MMDrawerController alloc] init]; [self.drawer setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeNone]; But it did not worked slide menu is still accessible from this View Controller – person Nov 19 '14 at 10:21
  • Yeah it worked I did not made new object for MMDrawerController I just imported AppDelegate and overwrite drawerController object in my View Controller and called the method setOpenDrawerGestureModeMask with argument MMOpenDrawerGestureModeNone – person Nov 19 '14 at 10:49
  • @pawandeepsingh sorry for late reply. now its working or not? you have to import all classes. – ChintaN -Maddy- Ramani Nov 19 '14 at 11:26
  • @pawandeepsingh if this answer is helpful and solve your problem then accept it as and answer or upvote. – ChintaN -Maddy- Ramani Nov 19 '14 at 11:57
0

if you don't want side menu for a view controller, call it using segue

example issue code:

assuming you have used this code in the side menu to navigate to other view controllers

switch(item selected) ....
case number:
centerViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"STORYBOARD_ID"];

instead use :

[self performSegueWithIdentifier:@"segue_identifier" sender:nil];

this will navigate to completely new context instead of adding your view controllers to the centerViewController of MMDrawerController