I am developing an app that use MFsidemenu
for the swipeBar.
My app consists of a loginController
which is an uiViewController
and after logging it change into an uiNavigationController
.
MFsidemenu
need this code running on the AppDelegate:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:[NSBundle mainBundle]];
UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
UIViewController *leftSideMenuViewController = [storyboard instantiateViewControllerWithIdentifier:@"leftSideMenuViewController"];
[MFSideMenu menuWithNavigationController:navigationController
leftSideMenuController:leftSideMenuViewController
rightSideMenuController:nil];
The problem is how to change the second line of the code if the initialView is an uiViewController
(Login) and after that, how to pass it to the secondViewController
(MainMenu) which is an uiNavigationController
?
In a shortway, I want the MFSidemenu
to work only on the secondController, which is the main controller. Thanks!
Updated: solved, by SpaceDust solution below :)
Question Update:
So the example of using MFSidemenu
only limited to showing a sidemenu on the controller. The example sideMenuController
exiled from any other segue on the storyboard. on the sidemenu I implemented uiTableViewController
to navigate to another controller. So how to change MainMenuView with sideMenuController
didSelectRowAtIndexPath
? I hope my english good enough to represent my situation though. Thanks once again!