I have implemented the ECSlidingViewController
framework to my project. That works. I can switch between my Viewcontrollers with the left side menu.
But now I want to set the current view / top view by clicking a UIButton
:
NSString *identifier = [NSString stringWithFormat:@"%@", @"newView"];
UIViewController *newTopViewController = [self.storyboard instantiateViewControllerWithIdentifier:identifier];
[self.slidingViewController anchorTopViewOffScreenTo:ECLeft animations:nil onComplete:^{
CGRect frame = self.slidingViewController.topViewController.view.frame;
self.slidingViewController.topViewController = newTopViewController;
self.slidingViewController.topViewController.view.frame = frame;
}];
When I click this button, the newView
-ViewController is on top, but the left menu is also visible. I've tried everything like the following to hide the menu:
[self.slidingViewController anchorTopViewTo:ECRight];
...
self.slidingViewController.underRightWidthLayout = ECVariableRevealWidth;
...
[self.slidingViewController anchorTopViewTo:ECLeft];
...
[self.slidingViewController anchorTopViewOffScreenTo:ECLeft];
...
self.slidingViewController.underLeftWidthLayout = ECFullWidth;
...
[self.slidingViewController resetTopView];
How can I hide the left menu?
Sorry for my english mistakes, I'm from Germany.