in my project, I would like to use the MMDrawerController plugin ( https://github.com/mutualmobile/MMDrawerController ), but I have a problem. I use a storyboard in the project, so I read this post http://pulkitgoyal.in/side-drawer-navigation-for-ios/ , but the plugin does not work.
I have a root view controller that calls another view (box) using segue and therefore uses this method (as indicated in the manual).
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"DRAWER_SEGUE"]) {
MMDrawerController *destinationViewController = (MMDrawerController *)segue.destinationViewController;
UIViewController *centerViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"FIRST_TOP_VIEW_CONTROLLER"];
[destinationViewController setCenterViewController: centerViewController];
UIViewController *leftDrawerViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"SIDE_DRAWER_CONTROLLER"];
[destinationViewController setLeftDrawerViewController: leftDrawerViewController];
}
}
When the destination view is loaded, I only see the centerView without the side box controller. Why?
Thanks in advance.
source
share