Working on a iOS 26 navigation bar. How do I keep the titleView and subtitleView centered? Since the 'back-button' text is taking up space.
Asked on 2026-01-13
1 search
To keep the titleView and subtitleView centered in an iOS 26 navigation bar, especially when the 'back-button' text is taking up space, you can utilize the new features provided in iOS 26. According to the session Build a UIKit app with the new design, iOS 26 introduces more control over the title and large title areas in the navigation bar, including the addition of a new subtitle that is rendered below the title. You can use attributed strings for fine-grained adjustments to both the title and subtitle.
Here are some steps you can follow:
-
Use Attributed Strings: This allows you to make fine adjustments to the positioning and styling of the title and subtitle.
-
Custom Views: Specify custom views for the title and subtitle to add interactive elements and ensure they are centered.
-
Flexible Spaces: Use flexible spaces with height to evenly distribute items in the navigation bar, which can help in centering the title and subtitle.
-
Layout Margins: Lay out your custom view contents using the layout margins to get the correct spacing, ensuring that the title and subtitle remain centered even when the back button text is present.
By following these guidelines, you can maintain a centered appearance for your title and subtitle in the navigation bar.

Build a UIKit app with the new design
Update your UIKit app to take full advantage of the new design system. We’ll dive into key changes to tab views, split views, bars, presentations, search, and controls, and show you how to use Liquid Glass in your custom UI. To get the most out of this video, we recommend first watching “Get to know the new design system” for general design guidance.

Make your UIKit app more flexible
Find out how your UIKit app can become more flexible on iPhone, iPad, Mac, and Apple Vision Pro by using scenes and container view controllers. Learn to unlock your app’s full potential by transitioning from an app-centric to a scene-based lifecycle, including enhanced window resizing and improved multitasking. Explore enhancements to UISplitViewController, such as interactive column resizing and first-class support for inspector columns. And make your views and controls more adaptive by adopting new layout APIs.

Build a SwiftUI app with the new design
Explore the ways Liquid Glass transforms the look and feel of your app. Discover how this stunning new material enhances toolbars, controls, and app structures across platforms, providing delightful interactions and seamlessly integrating your app with the system. Learn how to adopt new APIs that can help you make the most of Liquid Glass.
