title: How to make the transition to a view controller with a navigation bar?
body: <p>I have two modules that I need to connect.</p>
  <ol>
  <li>The authorization module, which consists of 1 screen. There is no
  controller Navigation on it and it is not in its stack.</li>
  <li>Main application. The first screen is the root for the controller
  navigation.</li>
  </ol>
  <p>How can I implement the transition in case of successful authorization from the authorization screen to the main application in Swift code?</p>
  <p><a href="https://i.stack.imgur.com/tpano.png" rel="nofollow noreferrer">My screen scheme</a></p>
  <h1><strong>SOLUTION:</strong></h1>
  <p>I use this solution for my case:</p>
  <pre><code>let vc = UIStoryboard(name: &quot;Main&quot;, bundle: nil).instantiateViewController(withIdentifier: &quot;rootVC&quot;)
          UIApplication.shared.delegate?.window??.rootViewController = vc
          view.present(vc, animated: true) {
              self.view.dismiss(animated: false, completion: nil)
          }
  </code></pre>