我已经在ECSlidingViewController
我的项目中实现了框架。这样可行。我可以使用左侧菜单在我的视图控制器之间切换。
但现在我想通过单击来设置当前视图/顶视图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;
}];
当我单击此按钮时,newView
- ViewController位于顶部,但左侧菜单也可见。我已经尝试了以下所有方法来隐藏菜单:
[self.slidingViewController anchorTopViewTo:ECRight];
...
self.slidingViewController.underRightWidthLayout = ECVariableRevealWidth;
...
[self.slidingViewController anchorTopViewTo:ECLeft];
...
[self.slidingViewController anchorTopViewOffScreenTo:ECLeft];
...
self.slidingViewController.underLeftWidthLayout = ECFullWidth;
...
[self.slidingViewController resetTopView];
如何隐藏左侧菜单?
对不起我的英语错误,我来自德国。