title: How to display another view from an existing view in SwiftUI
body: <p>I have an existing view displayed.  After displaying that view for 2 seconds, I want to navigate or display another view.  The following code does not work.</p>
  <pre><code>override func viewDidLoad() {
          super.viewDidLoad()
          // Do any additional setup after loading the view.
          UIGraphicsBeginImageContext(self.view.frame.size)
              UIImage(named: &quot;ProfileSplashScreen&quot;)?.draw(in: self.view.bounds)
              let image: UIImage = UIGraphicsGetImageFromCurrentImageContext()!
              UIGraphicsEndImageContext()
              self.view.backgroundColor = UIColor(patternImage: image)
        DispatchQueue.main.asyncAfter(deadline: .now()+2.0) {
          GameSelectorController()
  }
  //=====================================================
  import SwiftUI
  
  struct GameSelectorController: UIViewController {
      var body: some View {
          Text(/*@START_MENU_TOKEN@*/&quot;Hello, World!&quot;/*@END_MENU_TOKEN@*/)
      }
  }
  
  struct GameSelectorController_Previews: PreviewProvider {
      static var previews: some View {
          GameSelectorController()
      }
  }
  </code></pre>