1) launch a new button
//change to play let button = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Play, target: self, action: "someAction") navigationBar.topItem.leftBarButtonItem = button //change to pause let button = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.Pause, target: self, action: "someOtherAction") navigationBar.topItem.leftBarButtonItem = button
2) Just change the text:
navigationBar.topItem?.leftBarButtonItem?.title = "AnyText"
If you also have problems accessing the navigation bar, it's probably best to just set a tag for it (I like to use negative tags for certain views * to make sure that 2 views * don't get the same tag) Then you can do it like this:
let navigationBar = (self.view.viewWithTag(-1) as UINavigationBar) navigationBar.topItem?.leftBarButtonItem?.title = "AnyText"
source share