1

我的侧抽屉里有一个表格视图。当我点击其中一个单元格时,一切都会打开并且工作正常。现在当我第二次尝试打开侧抽屉时,它不会打开(即使我尝试点击按钮或向右滑动)。侧边菜单只能工作一次。我该如何解决这个问题?</p>

我在 AppDelegate 中使用的代码 -

-(void)slideOutMenu{

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];

TabBarController *centerPage = [storyboard instantiateViewControllerWithIdentifier:@"TabBar"];
RightSlideMenu *rightSideMenu = [storyboard instantiateViewControllerWithIdentifier:@"RightMenu"];

UINavigationController *centerNav = [[UINavigationController alloc] initWithRootViewController:centerPage];
UINavigationController *rightNav = [[UINavigationController alloc] initWithRootViewController:rightSideMenu];

self.drawerController = [[MMDrawerController alloc] initWithCenterViewController:centerNav rightDrawerViewController:rightNav];

self.drawerController.openDrawerGestureModeMask = MMOpenDrawerGestureModePanningCenterView;
self.drawerController.closeDrawerGestureModeMask = MMCloseDrawerGestureModeAll;

self.window.rootViewController = self.drawerController;
[self.window makeKeyAndVisible];
}

我也尝试在 tabbarcontroller 的类中实现代码,但是 mmdrawer 根本没有打开。

预先感谢

阿克谢

4

1 回答 1

0

单击单元格时。您需要将“您的结果VC”设置为您的 MMDrawerContoler的中心页面

请检查:

    AppDelegate *app = (AppDelegate*)[[UIApplication sharedApplication]delegate];

resultentVC *res = [self.storyboard instantiateViewControllerWithIdentifier:@"resVC"];
            UINavigationController *nav=[[UINavigationController alloc]initWithRootViewController:res];
            [app.drawer setCenterViewController:nav withCloseAnimation:true completion:nil];

      [app.drawer setCenterViewController:nav withCloseAnimation:true completion:nil]; 
于 2017-04-14T05:36:31.750 回答