I have a theme in my app utilising UIAppearance to set custom colors for buttons, switches, etc. It works fine with all of the ObjC and UIKit elements in my app.
I just added a SwiftUI view, and it almost works for that too.
I have the following code for UISwitch to set the color to red...
UISwitch.appearance().onTintColor = UIColor.red
My SwiftUI view seems to honor that appearance when it first loads, but then reverts to the default green if I toggle the switch.
This seems like a bug to me, but any thoughts would be appreciated. You can see it happening in the video here… https://www.loom.com/share/89159ec0db974fdaba5d4020d4848f98