Post

Replies

Boosts

Views

Activity

The onTapGesture modify of the parent view will override the color picker
Here is the simplest code, i find father View's onTapGesture modify will override ColorPicker, i think it's a bug, or is there any way to solve it struct TestView: View {   @State var color: Color = .red       var body: some View {     VStack{       Spacer()       ColorPicker("pick bgColor", selection: $color)       Spacer()     } .background(color)     .onTapGesture {       print("click blank space")     }   } }
0
0
341
Apr ’21