mikefrederick / MFSideMenu

Facebook-like side menu for iOS
Other
1.17k stars 291 forks source link

Upgrading from 0.4.6 instructions, can I still use with navigation controller? #194

Open JulesMoorhouse opened 9 years ago

JulesMoorhouse commented 9 years ago

Hi,

I've been happily using MFSideMenu 0.4.6 for some time, however with iOS8, there's a bug when calling...

[self.sideMenu setMenuState:MFSideMenuStateClosed];

.. from a row, that fails to hide the side menu. To be honest, I'd be happy if I could just work around this, I think, unless there are other issues I've not found. Perhaps you might comment on this?

But I am keen to upgrade to the latest version, however I'm using a navigation controller and following the old 0.4.6 functionality approach. Can you offer me any advice and if possible any guidance about upgrading?

Just to highlight my current setup... in appdelegate I have....

I can't find example code showing tab controller with multiple navigation controllers.

self.tabBarController.viewControllers = [NSArray arrayWithObjects:
           [self cbSideMenu].navigationController, navController2, navController3, 
           navController4, navController5, nil];

self.window.rootViewController = self.tabBarController;

Then...

- (MFSideMenu *)cbSideMenu {

SideMenuViewController *leftSideMenuController = [[SideMenuViewController alloc] init];

UIViewController *vcCB = [[CBViewController alloc] initWithNibName:@"CBView" bundle:nil];

UINavigationController *navController1 = [[UINavigationController alloc]
                                          initWithRootViewController:vcCB];

navController1.tabBarItem.image = [UIImage imageNamedTK:@"calc"];

MFSideMenu *sideMenu = [MFSideMenu menuWithNavigationController:navController1
                                         leftSideMenuController:leftSideMenuController
                                        rightSideMenuController:Nil];
leftSideMenuController.sideMenu = sideMenu;

return sideMenu;
}

Thanks so much, in advance.

Best regards,

Jules. PS. Good job with the library :)