         self.navigationItem.titleView = label
     }
     
-
-}
+    
+    internal func setToolBarUI() {
+        
+        view.addSubview(toolBar)
+        
+        toolBar.snp.makeConstraints { (make) in
+            make.left.right.bottom.equalTo(self.view)
+        }
+        
+    }
+
+}

        // 2. 设置占位文字
        self.placeHolderLabel.isHidden = textView.hasText
    }
}

//设置UI相关
extension JQComposeController {
    
    internal func setupUI() {
        self.setNavUI()
        
        view.addSubview(textView)
        

        
        let label = UILabel(title: "分享新鲜事...", textColor: UIColor.lightGray, fontSize: 14)
        return label
    }()
    
    internal lazy var toolBar: UIToolbar = {
        
        let tool = UIToolbar()
        
        var itemArray = [UIBarButtonItem]()
        
        //添加五个按钮
        let imageNames = ["compose_toolbar_picture",
                          "compose_mentionbutton_background",
                          "compose_trendbutton_background",
                          "compose_emoticonbutton_background",
                          "compose_add_background"]
        
        for  (i,value) in imageNames.enumerated() {
            let btn = UIButton()
            btn.setImage(UIImage(named:value), for: .normal)
            btn.setImage(UIImage(named:value + "_highlighted"), for: .highlighted)
            
            btn.tag = i
            btn.sizeToFit()
            btn.addTarget(self, action: #selector(typeButtonClick), for: .touchUpInside)
            
            let item = UIBarButtonItem(customView: btn)
            
            itemArray.append(item)
            
            //添加弹簧
            let space = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.flexibleSpace, target: nil, action: nil)
            
            itemArray.append(space)
        }
        
        itemArray.removeLast()
        tool.items = itemArray
        
        return tool
    }()

}
