Yeah, here it is
Thanks.
The Italicized and bolded part is the code that I am referencing
It is very kind marking the point of interest, but code formatting would make it more readable.
Please use Code block (icon ``) feature of this site.
There may be several ways, but in your case this would work:
Picker("Number of People:", selection: $numberOfPeople){
ForEach(1...100, id: \.self) { //-
Text("\($0) people")
}
}
When you use ForEach(_:id:), id of each element will be used as a selection value.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: