title: picker to list in Xcode
body: <p>I am making a school timetable app where you select the day on tab 2 and it shows the day's schedule on the other but I haven't been able to translate the picker choice into which day is shown. I have put the data for each day into private var's Amonday - Afriday and will add b versions (as seen in picker options) later once I have the picker selection working</p>
  <p>Xcode 13.3 building for Apple Watch</p>
  <pre><code>import SwiftUI
  
  struct Period: Identifiable {
      let name: String
      let id = UUID()
  }
  
  private var Amonday = [
      Period(name: &quot;Maths&quot;),
      Period(name: &quot;Break: Library duty&quot;),
      Period(name: &quot;Science&quot;),
      Period(name: &quot;French&quot;),
      Period(name: &quot;Lunch: Library duty&quot;),
      Period(name: &quot;English&quot;),
      Period(name: &quot;Re&quot;)
  ]
  private var Atuesday = [
      Period(name: &quot;german&quot;),
      Period(name: &quot;break&quot;),
      Period(name: &quot;history&quot;),
      Period(name: &quot;science&quot;),
      Period(name: &quot;Lunch: Politics club&quot;),
      Period(name: &quot;dt&quot;),
      Period(name: &quot;maths&quot;)
  ]
  private var Awednesday = [
      Period(name: &quot;dt&quot;),
      Period(name: &quot;break&quot;),
      Period(name: &quot;german&quot;),
      Period(name: &quot;music&quot;),
      Period(name: &quot;lunch&quot;),
      Period(name: &quot;geography&quot;),
      Period(name: &quot;english&quot;)
  ]
  private var Athursday = [
      Period(name: &quot;art&quot;),
      Period(name: &quot;Break&quot;),
      Period(name: &quot;Geography&quot;),
      Period(name: &quot;Pe&quot;),
      Period(name: &quot;Lunch&quot;),
      Period(name: &quot;science&quot;),
      Period(name: &quot;history&quot;),
  ]
  private var Afriday = [
      Period(name: &quot;English&quot;),
      Period(name: &quot;break&quot;),
      Period(name: &quot;Science&quot;),
      Period(name: &quot;Maths&quot;),
      Period(name: &quot;Lunch&quot;),
      Period(name: &quot;Pe&quot;),
      Period(name: &quot;Computeing&quot;)
  ]
  
  var today = Amonday
  
  var selectedday = 1
  
  struct ContentView: View {
      var body: some View {
          TabView(selection: /*@START_MENU_TOKEN@*//*@PLACEHOLDER=Selection@*/.constant(1)/*@END_MENU_TOKEN@*/) {
              List(Amonday) {
                      Text($0.name)
                  }
                  .tabItem {  }.tag(1)
              
              Picker(selection: /*@START_MENU_TOKEN@*/.constant(1)/*@END_MENU_TOKEN@*/, label: Text(&quot;&quot;)
                  .frame(height: 4.0)) {
                      Text(&quot;A - Monday&quot;).tag(1)
                      Text(&quot;A - Tuesday&quot;).tag(2)
                      Text(&quot;A - Wednesday&quot;).tag(3)
                      Text(&quot;A - Thursday&quot;).tag(4)
                      Text(&quot;A - Friday&quot;).tag(5)
                      Text(&quot;B - Monday&quot;).tag(6)
                      Text(&quot;B - Tuesday&quot;).tag(7)
                      Text(&quot;B - Wednesday&quot;).tag(8)
                      Text(&quot;B - Thursday&quot;).tag(9)
                      Text(&quot;B - Friday&quot;).tag(10)
                  
                  }.tabItem {  }.tag(2)
          }
          
          
      }
  }
  
  struct ContentView_Previews: PreviewProvider {
      static var previews: some View {
          ContentView()
              
      }
  }
  </code></pre>