https://github.com/SocialObjects-Software/AMSlideMenu
in some screens need to disable slide menu and implement UInavigationbar button for other action
it's possible?
thanks
https://github.com/SocialObjects-Software/AMSlideMenu
in some screens need to disable slide menu and implement UInavigationbar button for other action
it's possible?
thanks
AMSlideMenu provide some method to disable gesture :
- (void)addLeftMenuButton;
- (void)addRightMenuButton;
- (void)disableSlidePanGestureForLeftMenu;
- (void)disableSlidePanGestureForRightMenu;
- (void)enableSlidePanGestureForLeftMenu;
- (void)enableSlidePanGestureForRightMenu;
Just call disableslidegesture
in your controller.
And change your navigationbar button target.
To set menu button to your own, place the following code in a view controller:
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"back_button"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(action:)];
self.navigationController.navigationBar.topItem.leftBarButtonItem = anotherButton;
To ndisable pan gesture in view controller, then just import "UIViewController+AMSlideMenu.h" and call [self disableSlidePanGestureForLeftMenu];
@DarkSun's answer seems correct for me. But in addition to it I wanted to mention that since iOS 8 you should call [self disableSlidePanGestureForLeftMenu];
in your ViewController's viewWillAppear
function.
#import "UIViewController+AMSlideMenu.h"
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[self disableSlidePanGestureForLeftMenu];
}