Hello,
I use sheet modifier to display a modal view. I also use new Toolbar API to provide a few actions. I notice that items with destructiveAction and cancellationAction placement doesn't appear. confirmationAction works as expected.
I use sheet modifier to display a modal view. I also use new Toolbar API to provide a few actions. I notice that items with destructiveAction and cancellationAction placement doesn't appear. confirmationAction works as expected.
Code Block swift import SwiftUI struct ContentView: View { @State private var showingAlert = false var body: some View { Button("Show modal") { showingAlert = true }.sheet(isPresented: $showingAlert) { NavigationView { Modal() } } } } struct Modal: View { var body: some View { Text("Modal") .toolbar { ToolbarItem(placement: .confirmationAction) { Button("Confirm") {} } ToolbarItem(placement: .cancellationAction) { Button("Cancel") {} } ToolbarItem(placement: .destructiveAction) { Button("Delete") {} } } } }