[英]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.