My picker looks like this:
Picker("Color", selection: $backgroundColor.animation(), content: {
ForEach(TransactionCategory.Colors.allCases, id: \.self) { color in
Text(color.rawValue)
.tag(color)
.foregroundStyle(color.getColor())
}
})
This changes a tint color which is applied to the entire tabview. I can see that it's working because the buttons in the top tab bar are changing color as I change the picker value. However, the color of the text inside the picker is not changing until I go back one view and then come back to this view. I tried setting an ID on the picker and then updating it when the picker value changes, but that didn't work.
Any ideas?