Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[self mainSlideMenu] return nil after second load of mainviewcontroller #184

Open
Ergul opened this issue Sep 29, 2016 · 0 comments
Open

Comments

@Ergul
Copy link

Ergul commented Sep 29, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant