1

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.

TalkingCode
  • 13,407
  • 27
  • 102
  • 147
  • I've no experience creating the macOS app, but I found this [post](https://stackoverflow.com/questions/60464925/how-do-i-add-a-toolbar-to-a-macos-app-using-swiftui), so what do you think? – Harshil Patel Nov 16 '20 at 19:48
  • @Luffy I tried that already. But it is not working with me. Seems there is a little bit of information missing from that post. – TalkingCode Nov 17 '20 at 15:06

0 Answers0