In an iOS
app using SwiftUI
, I have set an alert with this kind of code:
Alert(title: Text("Nice Title"),
message: Text("Some important message for the user."),
dismissButton: .none)
It works, but I would like to change one detail. The alert has a blue OK button. I want to customize it to have a grey OK button.
I have tried a couple of tweaks, one of them being this:
Alert(title: Text("Nice Title"),
message: Text("Some important message for the user."),
dismissButton: .default(Text("OK").foregroundColor(.gray)))
But none of my trials worked.
If anyone knows the way to go, please let me know.