Delete Confirmation Dialog Inside Toolbar IOS26

inline-code

How do you achieve this effect in toolbar? Where is the documentation for this?

  • How to make it appear top toolbar or bottom toolbar?

Thank you!

Here is what I have now...

 .toolbar {
                             ToolbarItem(placement: .destructiveAction) {
                                 Button {
                                     showConfirm = true
                                 } label: {
                                     Image(systemName: "trash")
                                         .foregroundColor(.red)
                                 }
                             }
                         }
                         .confirmationDialog(
                             "Are you sure?",
                             isPresented: $showConfirm,
                             titleVisibility: .visible
                         ) {
                             Button("Delete Item", role: .destructive) {
                                 print("Deleted")
                             }

                             Button("Archive", role: .none) {
                                 print("Archived")
                             }

                             Button("Cancel", role: .cancel) { }
                         }
}
Delete Confirmation Dialog Inside Toolbar IOS26
 
 
Q