回到Root_View Navbar按钮后,幻灯片菜单不再工作了

时间:2017-01-27 10:51:50

标签: ios uinavigationcontroller mmdrawercontroller

我使用swift3和MMDrawerController创建幻灯片菜单。

MMDrawerController代码是appdelegate:

    let mainStoryBoard : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)

    let homeViewController = mainStoryBoard.instantiateViewController(withIdentifier: "HomeViewController") as! HomeViewController
    let cartViewController = mainStoryBoard.instantiateViewController(withIdentifier: "CartViewController") as! CartViewController
    let menuViewController = mainStoryBoard.instantiateViewController(withIdentifier: "MenuVCGuest") as! MenuVCGuest

    let leftSideNav = UINavigationController(rootViewController: cartViewController)
    let centerNav = UINavigationController(rootViewController: homeViewController)
    let rightSideNav = UINavigationController(rootViewController: menuViewController)

    centerContainer = MMDrawerController(center: centerNav, leftDrawerViewController: leftSideNav, rightDrawerViewController: rightSideNav)

一切正常,我可以从幻灯片菜单导航到其他一些ViewControllers ......但如果我从另一个UINavigationController导航到ViewController并返回App的主页面(Root_View),导航栏中的幻灯片菜单按钮不会工作了......

我创建了多个UINavigationController来在全屏幕视图中打开新页面而不是导航过程的子视图...

enter image description here

因此,在分离UINavigationControllers时,主页面导航栏上的幻灯片菜单按钮停止工作!

我现在该怎么办?

抱歉我的英语不好......

0 个答案:

没有答案