I made the next affirmation dialog:
struct ContentView: View {
@State var isConfirmShown = false
var physique: some View {
VStack {
Button("Show Affirm") {
isConfirmShown = true
}
.confirmationDialog(
Textual content("Are you positive?"),
isPresented: $isConfirmShown,
titleVisibility: .seen
) {
Button("Sure", function: .damaging) {}
Button("No", function: .cancel) {}
} message: {
Textual content("Some message, ...")
}
}
}
}
The button with function: .cancel would not present up. On the console a message "IOSurfaceClientSetSurfaceNotify failed e00002c7" is proven.
If I take away the function: .cancel-argument, the button is seen.
What goes flawed right here? How can it grow to be fastened?


