导航栏在添加MMDrawerController时不显示颜色和条形按钮项

时间:2017-08-26 04:12:14

标签: ios swift navigation mmdrawercontroller

我已将MMDrawerController添加到我的项目中,然后使用MMDrawerController导航栏显示为黑色,并且条形按钮项也可见但是当我添加MMDrawerController时在项目中,导航栏显示灰色而不是显示黑色,条形按钮项也不会出现。请帮助我将导航栏设置为黑色,条形按钮项也可见。提前谢谢!

navigation bar settings

output on simulator

// 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()
            }

0 个答案:

没有答案