New style sidebars in SwiftUI using NSHostingController

I'm working on a project that will add a window with a SwiftUI's NavigationView. The window will still be a NSWindow with a NSHostingController inside a Storyboard file.

The issue is that the NavigationView is not showing the navigationTitle as expected for the new style of the sidebars.

To show my problem I have a link to a sample project. It has two targets with exactly the same SwiftUI views, but one is using Storyboards and NSHostingController, and the other is a full SwiftUI view. The idea is to have the NSHostingController view look and behave as the SwiftUI one. See image:

Any help with this will be appreciated.

Hello! You can try to call the method in your window

window.styleMask.update(with: .fullSizeContentView)
New style sidebars in SwiftUI using NSHostingController
 
 
Q