MMDrawerController icon indicating copy to clipboard operation
MMDrawerController copied to clipboard

Cannot push to centralViewController

Open simplyi opened this issue 12 years ago • 1 comments

Hi guys!

I am having issue with pushing new view controller to centerViewController. Simply setting centerViewController to a new one works! But then there is no Back button. I need to push new view controller so that user can use Back button to navigate back.

Here is now I create MMDrawerController:

 MMDrawerController *container = [[MMDrawerController alloc]
                                         initWithCenterViewController:navController
                                         leftDrawerViewController:leftMenuViewController
                                         ];


container.centerHiddenInteractionMode = MMOpenDrawerGestureModePanningCenterView;
container.openDrawerGestureModeMask = MMOpenDrawerGestureModePanningCenterView;
 container.closeDrawerGestureModeMask = MMOpenDrawerGestureModePanningCenterView;

self.window.rootViewController = container;

Then eventually in my app I do these:

[appDelegate.container.centerViewController.navigationController pushViewController:myNewViewController animated:YES];

But nothing happens :( . View does not change.

if I do appDelegate.container.centerViewController = myNewViewController then view changes but there is no Back button which I need.

Can you advise me?

simplyi avatar Jun 03 '14 19:06 simplyi

Is appDelegate.container.centerViewController.navigationController nil? There are plenty of cases where people are successfully using UINavigationController as the center, so I would be surprised if there was an issue here with the drawer controller.

Good luck. Let me know if you find any more evidence suggesting otherwise.

kcharwood avatar Aug 25 '14 13:08 kcharwood