79767562

Date: 2025-09-17 16:06:06
Score: 1.5
Natty:
Report link

For my answer, most of the credit should actually go to @Rion, as his answer inspired me.
I had an issue with using .sharedBackgroundVisibility(.hidden) when actually using navigation, which I described here How to leftalign Text in Toolbar under iOS 26.

However, using .toolbarRole(.editor) in combination with ToolbarItem(placement: .principal) got me exactly the result I needed.

My only issue with @Rion's answer was that I could not customize the actual title; it was fixed to the standard system size. So, the combination above actually gives the proper result (at least on the iPhone).

tl;dr

(Hacky) Solution without any visual artifacts when using back navigation

SomeViewWithinNavigationStack()
   .navigationBarTitleDisplayMode(.inline)
   .toolbar { 
       ToolbarItem(placement: .principal) {
           Text("My styled title")
       }
    }
    .toolbarRole(.editor)

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Rion
  • User mentioned (0): @Rion's
  • Low reputation (1):
Posted by: Adam Melkus