GO FURTHER, FASTER: Try the Swift Career Accelerator today! >>

Changing document based app title

Forums > macOS

Hello, I am looking for a way to update document title in the top toolbar on a document based app. I created a NavigationSplitView, it displays the name of the document whatever I try, navigationTitle() is ignored. Is there a way to custom the title?

Thanks once again! 😊

4      

If you want to customize the document title in your document-based app with a NavigationSplitView, using .navigationTitle() alone may not be sufficient. Consider setting the document's own title property directly. This will override the default behavior and ensure that the title in the toolbar is updated accordingly.

   

Hacking with Swift is sponsored by Essential Developer.

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until September 29th.

Click to save your spot

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.