简体   繁体   English

当我单击leftViewcontroller单元格时,MMDrawerController导航到另一个视图控制器

[英]MMDrawerController navigating to another view controller when I click on the leftViewcontroller cell

I am implemented MMDrawerController for my application when I clicking in the leftView cell I need to navigate to another view controller as a new controller ,but if I am pushing the view controller its opening in the same left view only its not open as a new vc. 当我单击leftView单元格时,我为我的应用程序实现了MMDrawerController,我需要导航到另一个视图控制器作为新的控制器,但是如果我在相同的左视图中推动视图控制器的打开,则只能将其作为新的vc打开。

if I given presentviewcontroller. 如果我给了presentviewcontroller。 its not navigate to child view of my vc. 它不导航到我的vc的子视图。

please help me . 请帮我 。

Try this : 尝试这个 :

viewcontroller = Where you want to push the Screen..! viewcontroller =您要推屏幕的位置。

Make sure mmDrawerController (object of MMDrawerController() ) has viewControllers , here mmDrawerController means where I initialized it first time . 确保mmDrawerController(MMDrawerController()的对象)具有viewControllers,此处mmDrawerController表示我第一次对其进行初始化的位置。 Like in appDelegate or etc.. 就像在appDelegate等中一样。

Check if it is nil or not: print(mmDrawerController.centerViewController) 检查是否为零:print(mmDrawerController.centerViewController)

@IBAction func btnTapped(sender:UIButton) {
        let viewcontroller = UIViewController()
        mmDrawerController.setCenterView(viewcontroller, withFullCloseAnimation: false, completion: nil)
    }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 单击另一个视图控制器中的按钮时实现原型单元 - implement prototype cell when I click a button in another view Controller MMDrawerController:将相同的实例leftViewController用于两个单独的中心View Controller - MMDrawerController: Using the same instance leftViewController for two separate center View Controllers 中心控制器具有Scroll View时MMDrawerController的平移手势行为 - MMDrawerController pan gesture behaviour when center controller has Scroll View 单击表格视图单元格时转到另一个视图 - Going to another view when I click a tableview cell 当我轻按任何集合视图单元格时(不点击最后一个单元格),如何移动另一个视图控制器? - How to move another view controller when i tapped any collection view cell (without taping last cell)? 导航时关闭视图控制器 - Dismiss view controller when navigating 为什么当我使用模式搜索将表视图单元格连接到另一个视图控制器时,为什么要更改视图控制器中的内容? - why when i connect a table view cell to another view controller with modal segue i change things in the view controller? MMDrawerController每个视图控制器上都有滑块 - MMDrawerController having slider on each View Controller MMDrawerController使中心视图控制器完全可见 - MMDrawerController keep center view controller completely visible 单击表格单元格时,将变量值发送到下一个视图控制器 - Send variable value to next view controller when click a table cell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM