Maybe, and I'll try that. Or maybe I'll just replace the UIColor in my model with a SwiftUI Color.
Here is a far simplfied version of the problem though without a viewModel. Any idea how to get it to work?:
import SwiftUI
struct ZColorPicker: View {
@State private var bgColor = Color.systemTeal
@State private var uiColor: UIColor = UIColor.systemOrange
var body: some View {
VStack {
Circle()
.frame(width: radius, height: radius)
.foregroundColor(Color(bgColor.uiColor()))
ColorPicker("", selection: Color($uiColor))
.padding(.trailing, 30)
Spacer()
}
.padding(.top)
}
let radius: CGFloat = 80
}
This one is telling me to file a bug report :D
Failed to produce diagnostic for expression; please file a bug report