2 years ago
#76609
hatatabatata
Adding three pickers cause touch problems
We divided form by 3 and to each part we added wheel picker. The problem is touch of the pickers is moved so we can't easly change values. Form is in side bar.
Below three pickers in form.
Form {
Section {
TextField("\(nodes.n_array[id].text)", text: $nodes.n_array[id].text)
} header: { Text("Tekst") }
Section {
HStack(spacing: 0) {
Picker("Red", selection: $nodes.n_array[id].red) {
ForEach(0...255, id: \.self) { red in
Text("\(red)")
}
}
.pickerStyle(.wheel)
.frame(minWidth: 0)
.clipped()
Picker("Green", selection: $nodes.n_array[id].green) {
ForEach(0...255, id: \.self) { green in
Text("\(green)")
}
}
.pickerStyle(.wheel)
.frame(minWidth: 0)
.clipped()
Picker("Blue", selection: $nodes.n_array[id].blue) {
ForEach(0...255, id: \.self) { blue in
Text("\(blue)")
}
}
.pickerStyle(.wheel)
.frame(minWidth: 0)
.clipped()
}
} header: { Text("Kolor") }
}
}
swift
swiftui
picker
0 Answers
Your Answer