Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

110
Views
SwiftUI - NavigationBarTitleDisplayMode - Change title dynamically based on mode

Is there a way to get notified when the .navigationBarTitleDisplayMode (which is set to .automatic) of a view changes from .large to .inline or vice versa?

Something like an @Environment object similar to

@Environment(\.locale) var locale: Locale

Depending on the displayMode, I'd like to show a different title.
Something along the lines of:

@Environment(\.navigationBarTitleDisplayMode) var mode: NavigationBarTitleDisplayMode

...

.navigationBarTitle(mode == .large ? "I am the large title" : "Inline title")
.navigationBarTitleDisplayMode(.automatic)
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!