How to set back button text in iOS navigation controller?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
In a UINavigationController, the back button shown on screen is configured by the previous view controller in the navigation stack, not the one currently being displayed. That detail explains why setting the title on the pushed screen often appears to do nothing.
To customize the back button text, set the previous controller's navigation item before pushing the next screen. On newer iOS versions, you can also control whether text is shown at all with backButtonDisplayMode.
Once that ownership rule is clear, most back-button customization issues become much easier to reason about.
Set the Back Title on the Previous View Controller
Suppose FirstViewController pushes DetailViewController. The back button visible in DetailViewController comes from FirstViewController.
That is the simplest modern API for changing the text while keeping the standard back-button behavior and swipe-to-go-back gesture.
Use backBarButtonItem for Older Patterns
Another common approach is assigning a UIBarButtonItem:
This still belongs on the previous controller. The target and action are usually nil because the navigation controller handles the back action automatically.
Remove or Minimize Back Text
If you do not want a long title to appear in the back button, iOS offers a cleaner option than manually forcing empty strings:
That keeps the standard arrow while minimizing the text presentation. It is often the best choice when screen titles are long and you care about space in the navigation bar.
Apply a Global Appearance Rule
If the same style should apply across the app, configure UINavigationBarAppearance once:
Appearance APIs are useful for styling, but per-screen back text is still usually set on the previous view controller's navigation item.
Keep the Default Navigation Behavior
Avoid replacing the back button with a custom left bar button item unless you really need custom behavior. A custom button can disable the default interactive pop gesture or require extra code to restore it.
If your goal is only to change the displayed text, prefer backButtonTitle or backBarButtonItem. They keep the standard navigation controller behavior intact.
That usually gives you the customization you want without paying the maintenance cost of reimplementing native navigation behavior.
Common Pitfalls
- Setting the back button text on the destination view controller instead of the source view controller.
- Replacing the back button entirely when a simple title change would have been enough.
- Using an excessively long back title, which can truncate badly on smaller devices.
- Forgetting that global appearance styling and per-screen back text are different concerns.
- Removing the default back behavior and then losing the native swipe-back interaction.
Summary
- The visible back button is configured by the previous view controller.
- Use
navigationItem.backButtonTitlefor a simple text change. - '
backBarButtonItemis another valid option, especially in older codebases.' - Use
backButtonDisplayMode = .minimalwhen you want little or no text. - Prefer built-in APIs so the standard navigation behavior stays intact.

