This sample code exhibits two issues:
struct ContentView: View
{
@State private var myColor = Color.red
var body: some View {
VStack() {
List() {
Text("Object")
Text("Object")
Text("Object")
.listRowSeparatorTint(myColor)
Text("Object")
}
Button(action:{myColor = Color.green})
{Text("Change color")}
}
.foregroundColor(myColor)
}
}
- the row separator isn't redraws when the @State property change
- listRowSeparatorTint apply to two lines
The first point is really disappointing. Is there anyone which know if this is a bug or there is a more correct way to use listRowSeparatorTint with changing parameter?