r/SwiftUI • u/Salty-Island-9014 • 4h ago
Buttons in .confirmationDialog have a significant delay when triggered
When tapping a button in a .confirmationDialog (at least one tied to a .bottomBar ToolbarItem), a ridiculously long delay — about a full second after the dialog closes — occurs before the action triggers. This issue is present in some of Apple's apps, including Reminders, Shortcuts, and Notes, but notably not in the Photos app. It also occurs for .alert, though to a lesser degree. How can I eliminate this, preferably without dropping down to UIKit?
The problem has been present since iOS 26. I haven't checked whether it existed before then.
Example code:
struct ContentView: View {
private var confirmationDialogPresented = false
private var colorToggled = false
var body: some View {
NavigationStack {
Color(colorToggled ? .blue : .red)
.ignoresSafeArea()
.toolbar {
ToolbarItem(placement: .bottomBar) {
Button("Placeholder", systemImage: "square") {
confirmationDialogPresented = true
}
.confirmationDialog("Placeholder", isPresented: $confirmationDialogPresented) {
Button("Placeholder") {
colorToggled.toggle()
}
}
}
}
}
}
}
#Preview {
ContentView()
}





