List{
Button{
//Checking in
}label: {
Text("Check in")
.swipeActions {
Button{
//Checking in
}label: {
Text("Check in")
}.tint(.red)
}
}
}
I've tried to change the color of the background when swiping on a row. Nothing happens. It just keeps being the standard gray.
I've looked at a bunch of other people and it seems like they all put the modifier at the same place as me but they get a different result.
Add .buttonStyle(.plain)
to the Button
in the List:
List {
Button {
//Checking in
} label: {
Text("Check in")
.swipeActions {
Button {
//Checking in
} label: {
Text("Check in")
}
.tint(.red)
}
}
.buttonStyle(.plain)
}