I am trying to implement MMDrawer to implement the left drawer but only in one view controller and it is not the root controller. On click of login button I should be able to redirect to another view controller having left drawer and centre view
Almost a similar question to Using MMDrawer only in sub navigation view
-(void) signInButtonListener:(UIButton *)button{
UIViewController * leftDrawer = [[leftDrawerViewController alloc] init];
UIViewController * center = [[centreViewController alloc] init];
MMDrawerController * drawerController = [[MMDrawerController alloc]
initWithCenterViewController:center
leftDrawerViewController:leftDrawer
rightDrawerViewController:nil];
[drawerController setShowsShadow:NO];
[drawerController setRestorationIdentifier:@"MMDrawer"];
[drawerController setMaximumRightDrawerWidth:200.0];
[drawerController setOpenDrawerGestureModeMask:MMOpenDrawerGestureModeAll];
[drawerController setCloseDrawerGestureModeMask:MMCloseDrawerGestureModeAll];
[drawerController
setDrawerVisualStateBlock:^(MMDrawerController *drawerController, MMDrawerSide drawerSide, CGFloat percentVisible) {
MMDrawerControllerDrawerVisualStateBlock block;
block = [[MMExampleDrawerVisualStateManager sharedManager]
drawerVisualStateBlockForDrawerSide:drawerSide];
if(block){
block(drawerController, drawerSide, percentVisible);
}
}];
landingPageViewController *landingPageController = [UBNLandingPageViewController new];
[myNavigator pushViewController:drawerController animated:YES];
}