ARTICLE AD BOX
I am customizing a UINavigationBar using UINavigationBarAppearance.
My goal is:
Title should be left aligned
Title should be vertically centered inside the navigation bar
Behavior should be consistent across iOS versions
On latest iOS versions, this works perfectly — the title is left aligned and vertically centered. However, on older devices (for example iPhone X running older iOS), the title is still left aligned but not vertically centered (it appears slightly lower).
Here is the code I am using:
func setUpToolBar() { // Force inline title (left aligned) navigationItem.largeTitleDisplayMode = .inline navigationController?.navigationBar.prefersLargeTitles = true let appearance = UINavigationBarAppearance() appearance.configureWithTransparentBackground() if #available(iOS 26.0, *) { appearance.largeTitleTextAttributes = [ .font: UIFont.HelveticaNeueBold(32) ] } else { appearance.largeTitleTextAttributes = [ .font: UIFont.HelveticaNeueBold(32) ] } navigationController?.navigationBar.standardAppearance = appearance navigationController?.navigationBar.compactAppearance = appearance navigationController?.navigationBar.scrollEdgeAppearance = appearance self.title = String.strProgress.localized navigationItem.rightBarButtonItem = makeCircularBarButton( imageName: "iconUpgrade", backgroundColor: UIColor.white.withAlphaComponent(0.15), tintColor: .black, action: #selector(onTapUpgrade), target: self ) }Observed behavior
Latest iOS: Title is left aligned and vertically centered (correct)
Older iOS (iPhone X): Title is left aligned but not vertically centered
Expected behavior
The title should be vertically centered on all iOS versions, including older devices.
Question
Is there a supported way to vertically center the navigation bar title consistently across iOS versions when using UINavigationBarAppearance, without:
Increasing the navigation bar height
Using private APIs
Replacing the title with a custom titleView
Or is this a UIKit limitation that cannot be fixed for older iOS versions?
