我在tabBar控制器中使用MVYsideMenu。但问题是当我将sideMenuController声明为根视图控制器时,所以在其他视图中标签栏是隐藏的,即标签栏没有显示。 如何在不声明为根视图控制器的情况下实现此目的。 根视图控制器全屏显示。
[![UIStoryboard *storyboard = \[UIStoryboard storyboardWithName:@"Main" bundle: nil\];
homeMenuView *hMC = \[storyboard instantiateViewControllerWithIdentifier:@"homeMenuView"\];
// Create your main content view controller
UITabBarController *tVC = \[storyboard instantiateViewControllerWithIdentifier:@"tabBar"\];
// Initialize the MVYSideMenuController
MVYSideMenuOptions *options = \[\[MVYSideMenuOptions alloc\] init\];
options.bezelWidth = 0.0f;
options.contentViewScale = 1.0f; // 1.0f to disable scale
options.contentViewOpacity = 0.0f; // 0.0f to disable opacity
MVYSideMenuController *sideMenuController = \[\[MVYSideMenuController alloc\] initWithMenuViewController:hMC contentViewController:tVC options:options\];
\[\[\[UIApplication sharedApplication\] delegate\] window\].rootViewController = sideMenuController;
\[\[\[\[UIApplication sharedApplication\] delegate\] window\] makeKeyAndVisible\];][1]][1]