AMSlideMenu2 icon indicating copy to clipboard operation
AMSlideMenu2 copied to clipboard

[self mainSlideMenu] return nil after second load of mainviewcontroller

Open Ergul opened this issue 9 years ago • 0 comments

Hi,

[self mainSlideMenu] return nil after second call of MainVC, I use the storyboard version and the MainVC. The difference I see compared to your example is that the view -1 (just before the MainVC I have a ViewController not a NavigationController). to fix the problem I had to do this: `AMSlideMenuMainViewController *mainVC = [self mainSlideMenu];

if (mainVC==nil)
{
    UINavigationController *navigationController = self.navigationController;
    //look for mainvc
    for (UIViewController * view in navigationController.viewControllers)
    {
        AMSlideMenuMainViewController * viewtmp = (AMSlideMenuMainViewController *)view;
        if (viewtmp!=nil) mainVC = viewtmp;
    }

}

`

best regards,

Eric

Ergul avatar Sep 29 '16 09:09 Ergul