title: How to give back swipe gesture in SwiftUI the same behaviour as in UIKit (interactivePopGestureRecognizer)
body: <p>The interactive pop gesture recognizer should allow the user to go back the the previous view in navigation stack when they swipe further than half the screen (or something around those lines). In SwiftUI the gesture doesn't get canceled when the swipe wasn't far enough.</p>
  
  <p><strong>SwiftUI:</strong> <a href="https://imgur.com/xxVnhY7" rel="noreferrer">https://imgur.com/xxVnhY7</a></p>
  
  <p><strong>UIKit:</strong> <a href="https://imgur.com/f6WBUne" rel="noreferrer">https://imgur.com/f6WBUne</a></p>
  
  <hr>
  
  <p><strong>Question:</strong></p>
  
  <p>Is it possible to get the UIKit behaviour while using SwiftUI views?</p>
  
  <hr>
  
  <p><strong>Attempts</strong></p>
  
  <p>I tried to embed a UIHostingController inside a UINavigationController but that gives the exact same behaviour as NavigationView.</p>
  
  <pre><code>struct ContentView: View {
      var body: some View {
          UIKitNavigationView {
              VStack {
                  NavigationLink(destination: Text("Detail")) {
                      Text("SwiftUI")
                  }
              }.navigationBarTitle("SwiftUI", displayMode: .inline)
          }.edgesIgnoringSafeArea(.top)
      }
  }
  
  struct UIKitNavigationView&lt;Content: View&gt;: UIViewControllerRepresentable {
  
      var content: () -&gt; Content
  
      init(@ViewBuilder content: @escaping () -&gt; Content) {
          self.content = content
      }
  
      func makeUIViewController(context: Context) -&gt; UINavigationController {
          let host = UIHostingController(rootView: content())
          let nvc = UINavigationController(rootViewController: host)
          return nvc
      }
  
      func updateUIViewController(_ uiViewController: UINavigationController, context: Context) {}
  }
  </code></pre>