Usually the titleView will be a UILabel, so you can get it, drop it and set its text.
For some reason, I had problems using this in viewDidLoad
, adding it to viewWillAppear
seems like a trick.
((UILabel *)self.navigationController.navigationBar.topItem.titleView).text = @"your title here"
source share