Open caraldel opened 8 years ago
Try to remove leftBarButtonItem from navigationItem in -viewWillAppear:
method in a viewController that you don't wont to show the menu.
And also call -disableSlidePanGestureForLeftMenu
method.
e.g.
#import "UIViewController+AMSlideMenu.h"
//...
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated]
self.navigationItem.leftBarButtonItem = nil;
[self.mainSlideMenu disableSlidePanGestureForLeftMenu];
}
Thanks for your reply, but it doesn't work in the way i would like because I don't want to disable the leftBarButtonItem in which I have my back button. Is it any other way ??
Thanks in advance.
Ah, than just remove that line self.navigationItem.leftBarButtonItem = nil;
Removing the line it's working well and I can show the button again, but the left menu slides already. This line [self.mainSlideMenu disableSlidePanGestureForLeftMenu]; is not working ...
Can I configure my main view with adding the slide only in this view ?
Hmm, its very strange. Arte you sure that you wrote that in '-viewWillAppear:' method
Yes, I copy the method you posted and I added the log to show the [self.mainSlideMenu] and is not null, it returns me MainVC, where I tell to the application this: @interface MainVC : AMSlideMenuMainViewController
this solution works...but if any uipopovercontroller or uialertview shown and then dismissed...the left menu starts sliding again...any solution to this???
Yea, you are right, in my case I push the view with an alert 'Loading' until it finish to load the data for my next view and in this view is when is not working the line [self.mainSlideMenu disableSlidePanGestureForLeftMenu];
Hi @caraldel any solution found??
For now try to call [self.mainSlideMenu disableSlidePanGestureForLeftMenu];
again when popover/alertview is dismissed, until I'll fix this.
@arturdev even though i call this method its not working on dismissing the popover... :(
@arturdev I wanted to add one more point where in this issue comes up when keyboard appears. Now imagine I have a form in my UIViewController and there are 15+ elements for which keyboard will come up. Above fix is not working... Could you guide how to fix this?
For Swift:
Disable the content pan gesture in the viewWillAppear
override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(true) slideMenuMainVC?.contentPanGestureRecognizer.isEnabled = false }
Hello,
I have a question that I can't solve. I'm using your framework, but I want to show the Left menu only in the main view and not in other views. What is the way to configure the AMSlideMenu ?
Thanks a lot !