let item1 = UIBarButtonItem(title: "分享", style: .Plain, target: self, action: nil)
let item2 = UIBarButtonItem(barButtonSystemItem: .Pause, target: self, action: nil)
let item3 = UIBarButtonItem(image: UIImage(named: "main_badge@3x"), style: .Plain, target: self, action: nil)
// 弹簧
let space = UIBarButtonItem(barButtonSystemItem: .FlexibleSpace, target: self, action: nil)
let customToolBar = UIToolbar(frame: CGRectMake(0,300,self.view.frame.size.width,44))
customToolBar.setItems([item1,space,item2,space,item3], animated: true)
self.view.addSubview(customToolBar)