What Does toolbarTitleDisplayMode Do?

Hi,

New in iOS 17 and the aligned releases is a modifier "toolbarTitleDisplayMode". What does this do exactly?

https://developer.apple.com/documentation/SwiftUI/View/toolbarTitleDisplayMode(_:)

I've experimenting with it a bunch and can't ever see it do really anything so I'm sure I'm using it wrong. What is this for?

Replies

This allows you to customize the appearance of the navigation bar title. You set it on the contents within a navigation stack (same place you specify a toolbar and navigation title). The new option that brought about this API is inlineLarge, which iOS 17 introduces. The App Store and TV apps use this style - you can see it in the Search tab. The difference from the large style is it’s pushed up further on screen, so there’s more room for your content (like ads in App Store), and it doesn’t support leading (or center) items.