0

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.

Marcel Marino
  • 962
  • 3
  • 17
  • 34
  • Can you provide a sample app (on GitHub preferably)? If I'm understanding your setup, it seems like it should work. – Michael Enriquez Nov 16 '13 at 18:07
  • I believe I've fixed this already by simply using Standard Definitions to tell the same ECSlidingViewController to display differently. Since this was a work around and not a direct answer to the problem, I didn't post an answer. – Marcel Marino Nov 18 '13 at 16:01

0 Answers0