I reference your code and running on macOS.
Could I just ask your some questions?
Q1)How do I force divide content view width in half?
Q2)How do I place the circle on the rightmost in green area?
Q3)How do I avoid a gap between green area and red area?
thx
struct CircleRGB: View {
@Binding var rgb: RGB
var body: some View {
HStack {
Circle()
.fill(Color(rgb: self.rgb))
.frame(maxWidth: .infinity, alignment: .trailing)
.border(.green)
VStack {
Text("R: \(self.rgb.red)")
Text("G: \(self.rgb.green)")
Text("B: \(self.rgb.blue)")
}
.frame(maxWidth: .infinity, alignment: .leading)
.border(.red)
}
.padding()
.border(.yellow)
}
}