Hello
I am trying to use a Segmented picker to pick 1, 2,3,4 weeks. Don't think the State value of selectedWeek is changing. The picker comes up on screen and changes but the value seems to stay at .two when I do a print(selectedWeek)
@State var selectedWeek: TimeSpan = .two
var body: some View {
NavigationView {
VStack {
MyMapView()
.edgesIgnoringSafeArea(.all)
Picker("Time Span", selection: $selectedWeek) {
ForEach(TimeSpan.allCases) { weekSelected in
Text(weekSelected.name).tag(weekSelected)
}.pickerStyle(SegmentedPickerStyle())
.background(Color.gray)
.padding()