UINavigationBar Hide back Button Text

Nils picture Nils · May 25, 2014 · Viewed 107.1k times · Source

How can I hide the Back Button Text from an UINavigation Controller? I will only have the "<" and not "< Back"

Answer

rebello95 picture rebello95 · May 25, 2014

In the interface builder, you can select the navigation item of the previous controller and change the Back Button string to what you'd like the back button to appear as. If you want it blank, for example, just put a space.

You can also change it with this line of code:

[self.navigationItem.backBarButtonItem setTitle:@"Title here"];

Or in Swift:

self.navigationItem.backBarButtonItem?.title = ""