I'm surprised this simple code still doesn't work on iOS 13.3 / Xcode 11.3. On my iPhone SE it's almost all off screen.
It's just two pieces of text, side by side, and two pickers, side by side. Anyone know a workaround?
struct ContentView: View {
@State var choice: Int = 10
@State var choice2: Int = 10
var body: some View {
return VStack {
HStack {
Text("Some text here")
Spacer()
Text("Foo baz")
}
HStack {
Picker(selection: self.$choice, label: Text("C1")) {
ForEach(0..<10) { n in
Text("\(n) a").tag(n)
}
}
Picker(selection: self.$choice2, label: Text("C2")) {
ForEach(0..<10) { n in
Text("\(n) b").tag(n)
}
}
}
}
}
}