0

我已经添加MMDrawerController到我的项目中,在使用之前MMDrawerController,导航栏显示为黑色,并且栏按钮项也可见,但是当我添加MMDrawerController到项目中时,导航栏显示灰色而不是显示黑色,并且栏按钮项也没有。请帮助我获得黑色的导航栏和栏按钮项也可见。提前致谢!

导航栏设置

模拟器输出

//MARK: 添加MMDrawer控制器的函数 func buildNavigationDrawerInterface () {

    let mainStoryBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
    let centerVC = mainStoryBoard.instantiateViewController(withIdentifier: "tabbar") as!UITabBarController

    centerVC.tabBar.barTintColor = UIColor.black
    let leftVCs = mainStoryBoard.instantiateViewController(withIdentifier: "LeftViewController") as! LeftViewController


    let leftSideNav =  UINavigationController(rootViewController: leftVCs)

    let centerSideNav = UINavigationController(rootViewController: centerVC)

    drawerContainer = MMDrawerController(center: centerSideNav, leftDrawerViewController: leftSideNav)

    drawerContainer!.openDrawerGestureModeMask = MMOpenDrawerGestureMode.panningCenterView
    drawerContainer!.closeDrawerGestureModeMask = MMCloseDrawerGestureMode.panningCenterView
    //centerContainer?.setDrawerVisualStateBlock(MMDrawerVisualState.swingingDoorVisualStateBlock())

    window!.rootViewController = drawerContainer
    window!.makeKeyAndVisible()
            }
4

0 回答 0