I’d like to know, how I can setup a toolbar inside a sheet using SwiftUI on macOS.
I tried adding a NavigationView and used the following Code, but the top area of the sheet is always empty.
I tried adding a NavigationView and used the following Code, but the top area of the sheet is always empty.
Code Block .toolbar { ToolbarItem(placement: .confirmationAction) { Button(action: { // Do stuff self.presentationMode.wrappedValue.dismiss() } ) { Label("Done", systemImage: "checkmark.fill") } } ToolbarItem(placement: .cancellationAction) { Button(action: { self.presentationMode.wrappedValue.dismiss() } ) { Label("Cancel", systemImage: "checkmark.fill") } } }