title: SwiftUI: Programmatically setting value for Picker
body: <p>All of the examples on the Internet show the following type of code for implementing pickers:</p>
  
  <pre><code>struct MyView: View 
  {
     var colours = ["Red", "Green", "Blue"]
     @State private var myColourIndex = 1
     @State private var myColour = "Green"
     var body: some View 
     {
         VStack 
         {
             Picker(selection: $myColourIndex, label: Text("Choose a colour")) 
             {
                 ForEach(0 ..&lt; colours.count) 
                 {
                     Text(self.colours[$0])
                 }
             }
         }
     }
  }
  </code></pre>
  
  <p>This is probably very obvious but my question is how do you set the section based on the string value stored in myColour rather than the index?</p>