I'm trying to customise color of icon in swipeAction
of SwiftUI. Outside foregroundColor()
it works, inside, - not.
Button {
print("Hello")
} label: {
Label(
title: {},
icon: {
Image(systemName: "checkmark")
.foregroundColor(.purple) // It makes checkmark red
}
)
}
if #available(iOS 15.0, *) {
Text("Text").swipeActions {
Button {
print("Hello")
} label: {
Label(
title: {},
icon: {
Image(systemName: "checkmark")
.foregroundColor(.purple) // It doesn't change anything
}
)
}
}
}