I have an action sheet that has 5 elements and a cancel button. I am trying to make the cancel button color red but it is not working. I have seen this one SwiftUI ActionSheet different color for each action. The destructive button style makes the other tabs red but do not know how to make it red for the cancel tab. I have updated my cancel tab to the following but the color is still Blue, any suggestions would be great.
.cancel(Text("Cancel")
.font(.system(size: 40.0))
.foregroundColor(Color.red))
This below is my code for the ActionSheet:
.actionSheet(isPresented: $showLocationOptions) {
ActionSheet(title: Text("Which city/town is this place in ?"), message: Text("Select a location"), buttons: [
.default(Text(location1)) { },
.default(Text(location2)) { },
.default(Text(location3)) { },
.default(Text(location4)) { },
.default(Text(location5)) { },
.cancel(Text("Cancel")
.font(.system(size: 40.0))
.foregroundColor(Color.red))
])
}