I created a toolbar in IB with several buttons. I would like to be able to hide/show one of the buttons depending on the state of the data in the main window.
You can easily get the view and hide it this way
let view: UIView = barButtonItem.valueForKey("view") as! UIView view.hidden = true