Same issue here. Had to replace Menu with multiple Buttons in a row.
Also some Sheets don't dismiss when closed using a ToolbarItem. It's totally annoying. The behavior changes with every beta.
Post
Replies
Boosts
Views
Activity
Can confirm this. None of my apps is working on macOS. Hope this is fixed when running on macOS 11 Beta 5.
Can confirm this issue. Started to appear in beta 2.
Please try to replace body with sidebar, which looks like the following code:
var sidebar: some View {
List {
if sidebarType == .full || sidebarType == .homes {
Text("Homes")
.font(.headline)
ForEach(homeStore.homes) { home in
NavigationLink(destination: HomeView(home: home), tag: home.id.description, selection: $selectedHomeId) {
Label(home.name, systemImage: "house")
}
}
}
}
.listStyle(SidebarListStyle())
.navigationTitle(sidebarType == .homes ? "Homes" : "Other")
.navigationBarItems(trailing: SettingsButtonView())
}
var body: some View {
NavigationView {
sidebar
ContentView()
}
}
Adding ToolbarItems to iOS sheets actually works, if you put the content of the sheet inside a NavigationView. But shouldn't be like that.
Could fix this issue by using.
var sidebar : some View {}
was using before
var body : some View {}
Seems to be macOS only at the moment.
https://developer.apple.com/documentation/swiftui/menu
Thank you :)