Is it possible to customise the wheel pickers font und change the alignment to .leading
?
I think this will be what you expect.
struct ContentView: View {
let colors = ["Red", "Yellow", "Green", "Gray", "Black", "Purple", "White", "Brown", "Pink", "Blue"]
@State private var color = "Red"
var body: some View {
Picker(selection: $color, label: Text("")) {
ForEach(self.colors, id: \.self) { color in
HStack {
Text(color)
.font(.title)
.padding()
Spacer()
}
}
}
.pickerStyle(WheelPickerStyle())
.labelsHidden()
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With