title: Programaticly dismiss popover in SwifUI
body: <p>I try to dismiss a popover with setting the variable, that shows it to false.</p>
  
  <p>The sample code behaves quite strange.
  Is there a better way to dismiss the popover programaticly with the Cancel Button?</p>
  
  <pre><code>import SwiftUI
  
  struct ContentView: View {
    let lines = ["line 1", "line 2","line 3"]
    var body: some View {
      List {
        ForEach(lines, id: \.self)
        { Line(text: $0)
        }
      }
    }
  }
  
  struct Line: View {
    @State var text: String
    @State var showSheet = false
  
    var body: some View {
      VStack
      { Text("\(text)")
        .onTapGesture {
          self.showSheet = true
        }
      }.popover( isPresented: self.$showSheet,
                 arrowEdge: .trailing
               )
      { Pop(showSheet: self.$showSheet)
      }
    }
  }
  
  struct Pop: View {
    @Binding var showSheet: Bool
  
    var body: some View {
      VStack {   
        Text("Option 1")
        Text("Option 2")
        Button("Cancel")
        { self.showSheet = false
        }
      }
    }
  }
  </code></pre>