Skip to content

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

@Ergul

Description

@Ergul

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions