HStack{
FormLable(text: NSLocalizedString("Color", comment: ""))
Spacer()
Image(systemName: "circle.fill")
.font(.system(size: AppFontSize.baseSize.size() * 1.2, weight: .medium))
.foregroundColor(color)
.overlay(ColorPicker("Color", selection: $color).labelsHidden().opacity(0.015))
}
This is how I use the color picker. I used the same code in two different apps, and the color picker appeared in one app but not in the other. By the way, I upgraded Xcode to the latest version.
What is FormLable ?
Problem is opacity. You do not see the picker. But if you tap just outside the blue dot, it works (tested with Xcode 16.2).
I changed to:
Image(systemName: "circle.fill")
.font(.system(size: 12, weight: .medium))
.foregroundColor(.blue)
.overlay(ColorPicker("Color", selection: $color).labelsHidden().opacity(0.5)) // opacity(0.015))
Then you can see the picker more clearly.