1

In my project I have existing side menu i.e swrevealviewcontrtoller to display right side menu.It is working correctly. I want to add second right menu in between the project using slideNavigationController. This is the screen shot of my storyboard. I can not touch existing base code and Before login page I want to add slideNavigationController to display another right sidemenubar. i.e not my root view controller for that I referred these two links.SlideNavigationController,Solution for making rootviewcontroller

StoryBoard Image

 UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];

 LoginViewController *loginView = (LoginViewController*)[mainStoryboard instantiateViewControllerWithIdentifier: @"Login"];
 [loginView setModalPresentationStyle:UIModalTransitionStyleCrossDissolve];
 SlideNavigationController * slideNavCtl = [[SlideNavigationController alloc] initWithRootViewController:loginView];
 [self.window setRootViewController:slideNavCtl];

It is taking LoginViewController as root view controller.

As we are using SwrevealViewController at the first it contains modal segue so I am not able to display the right menu in login view controller. After adding that code in app delegate I am able to display right menu in loginpage but login page is the rootview but I want splash screen as a rootViewController. Using SlideNavigationController I want to display another right menu in login .

Avijit Nagare
  • 8,482
  • 7
  • 39
  • 68
Bhagyashri
  • 11
  • 2
  • Hey could you check [SlideNavigationController sharedInstance] API LeftMenuViewController *leftMenu = [[LeftMenuViewController alloc] init]; RightMenuViewController *rightMenu = [[RightMenuViewController alloc] init]; [SlideNavigationController sharedInstance].rightMenu = rightMenu; [SlideNavigationController sharedInstance].leftMenu = leftMenu; – Avijit Nagare Jun 06 '17 at 08:33
  • I didn't get you please tell me in breaf – Bhagyashri Jun 06 '17 at 12:25
  • [SlideNavigationController sharedInstance].rightMenu = slideNavCtl; [SlideNavigationController sharedInstance].leftMenu = slideNavCtl; comment your last line //[self.window setRootViewController:slideNavCtl]; – Avijit Nagare Jun 06 '17 at 13:32
  • I added this code in app delegate its showing blank right menu LoginNewViewController *homeView = (LoginNewViewController*)[mainStoryboard instantiateViewControllerWithIdentifier:@"LoginViewcontroller"]; [homeView setModalPresentationStyle:UIModalTransitionStyleCrossDissolve]; SlideNavigationController * slideNavCtl = [[SlideNavigationController alloc] initWithRootViewController:homeView]; // [self.window setRootViewController:slideNavCtl]; [SlideNavigationController sharedInstance].rightMenu = slideNavCtl; – Bhagyashri Jun 06 '17 at 14:15
  • Could you check the demo(SlideNavigationController from git ) how the have configured in slide menu in AppDelegate without setting root view controller.This should fix. – Avijit Nagare Jun 06 '17 at 15:25

0 Answers0