I am using ECSlidingViewController to create a side menu. Now I could simply pass variables to the menu to let it know what menu it should load, but I'd like to be able to have two (or more) separate menus that will be associated with different classes. So I have these files:
ECSlidingViewController
MainViewController
MainMenuViewController
AnnouncmentMenuViewController
AnnouncmentViewController
Let's ignore how confusing the names are.
The views load fine from the initController. I can swipe, swiper back, call up a different version of the same view, and all of that. If I am on MainViewController and I call up AnnoucementViewController:
AnnouncementViewController *newTopViewController;
newTopViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Announcements"];
Then the correct menu gets loaded, but it takes up the full screen and I can't swipe it back.
It associates the menu like so:
if(![self.slidingViewController.underLeftViewController isKindOfClass:[AnnouncmentMenuViewController class]]) {
self.slidingViewController.underLeftViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"AnnouncementsMenu"];
}
[self.view addGestureRecognizer:self.slidingViewController.panGesture];
If I can't fix this I'll eventually implement the other method, but really would prefer to have multiple menus, unless someone here has a good reason why that's a bad idea.