I m 试图在swipeAction
中校对icon的颜色。
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
}
)
}
}
}