0

I am using AMSliderMenu where I want to display left slider menu on button click.I want to add left navigation button on dashboard, On the button click event open left slider menu.

I have added custom button to navigation left bar item.I have created MainViewController and LeftMenuViewController, but when I call "openLeftMenu" from dashboard, It doesn't open menu.

MainViewController *mainViewController = [[MainViewController alloc] init];

[mainViewController openLeftMenu];

I have tried by adding MainViewController to navigation, but by default it display first controller from left menu. I want to open menu on button click not first view controller.

Anyone have any idea how it will work?

nadim
  • 776
  • 1
  • 12
  • 26

1 Answers1

0

Try this inside button click

  MainVC*dd = [self.storyboard instantiateViewControllerWithIdentifier:@"main"];

 [self presentViewController:dd animated:true completion:^{

   [dd.mainSlideMenu openLeftMenu];

 }];
Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87