setupNavBar

func setupNavBar() {

        
        let barColor = UIColor(red:94/255.0, green:94/255.0, blue:94/255.0, alpha:1)
        self.navigationController?.navigationBar.barTintColor = barColor;
        
        
        
        navigationController?.navigationBar.titleTextAttributes = [
            NSForegroundColorAttributeName: UIColor.white,
            NSFontAttributeName: UIFont.systemFont(ofSize: 18)
            ] //UIFont(name: "Heiti SC", size: 24.0)!
        
//        navigationItem.leftBarButtonItem = UIBarButtonItem.init(title: "个人", style: .plain, target: self, action: #selector(openDrawer))
      navigationItem.leftBarButtonItem =   UIBarButtonItem.init(image: UIImage.init(named: "run10"), style: .plain , target: self, action: (#selector(ZBNavVC.openDrawer)))
        
        
        navigationItem.title = "兼职任务宝";
        
    }

你可能感兴趣的:(setupNavBar)