I have been looking for an answer for an hour. But so far I only find solutions with a NaviagtionView. I do not want to do that. I have a single simple window. Similar to Safari or the system settings. I am not able to add a toolbar to this window.
What I tried so far:
In AppDelegate is set
window.toolbarStyle = .unified
But it seems to have no effect on the window.
Then I added a toolbar to my ContentView
.toolbar {
ToolbarItem{
Label("Hello", systemImage: "book.circle")
}
Still I see nothing of it.
Update:
It works fine with a new Projekt based on a »SwiftUI App« as Life Cycle. If I choose App Delegate I get no toolbar. Seems to me there is something in the App Delegate I have to set.