title: Supporting SwiftUI navigation in legacy projects
body: <p>I'm wondering if there's any way to start using <em>SwiftUI</em> in a legacy project and still be able to navigate back and forth <em>SwiftUI</em> scenes. That is, let's imagine I just want to support the last <em>iOS 13</em> for a project I've been working on for the last year. Everything is built upon <em>UIKit</em> and navigations happen the usual way presenting or pushing viewcontrollers.</p>
  
  <p>Now I want to start using SwiftUI so I enable the option in the General of my project, target <em>iOS 13</em>, get my <em>SceneDelegate</em> and my new key-value pair in <em>Info.plist</em>. In order to navigate to a <em>Swift UI</em> scene, I can just push a <em>UIHostingViewController</em> whose rootView will be my newly designed <em>SwiftUI</em> View. But how can I use <em>NavigationLink</em> to push an old <em>UIKit</em> view controller?</p>
  
  <pre><code>class ViewController: UIViewController {
  
      @IBAction func userDidTapGo(_ sender: Any) {
          let contentView = ContentView()
          navigationController?.pushViewController(UIHostingController(rootView: contentView), animated: true)
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
          title = "UIKit"
      }
  }
  
  struct ContentView: View {
      var body: some View {
          NavigationView {
              NavigationLink(destination: /* what should be here?? */) {
                  Text("Go to UIKit")
              }
  
          }.navigationBarTitle("Swift UI")
      }
  }
  </code></pre>