AMSlideMenu2
AMSlideMenu2 copied to clipboard
[self mainSlideMenu] return nil after second load of mainviewcontroller
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