Post

Replies

Boosts

Views

Activity

Reply to Programmatically create MenuBarExtra elements
Here is an example of the outcome I am trying to achieve: import SwiftUI @main struct SwiftBarApp: App { @NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate var body: some Scene { WindowGroup { ContentView() } MenuBarExtra("Title") { MenuBarView(menuItemSet: appDelegate.menuItems[0]) } MenuBarExtra("Title") { MenuBarView(menuItemSet: appDelegate.menuItems[1]) } }
Aug ’23