title: Navigation Bar Disappears Change Root ViewController and then reassign
body: <p>I've made the launch screen the root view while my app makes a request to firebase and then reassign the root view once the request has been completed. Unfortunately when I do this my navigation bar disappears or is covered up by the new root view. When I run the simulator I can see the navigation bar briefly and then it get covered up by my TableViewController. How do I keep this from happening?</p>
  
  <p>Here is my code from the AppDelegate where I make all of this happen:</p>
  
  <pre><code>    var window: UIWindow?
  let searchManager = SearchManager()
  
  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -&gt; Bool {
      makeRootViewLaunchScreen()
      FirebaseApp.configure()
      searchManager.getMosaicTitles { results in
          self.searchManager.listOfMosaics = results
          self.stopDisplayingLaunchScreen()
      }
      // Adds border to bottom of the nav bar
      UINavigationBar.appearance().shadowImage = UIImage.imageWithColor(color: UIColor(red:0.00, green:0.87, blue:0.39, alpha:1.0))
      // Override point for customization after application launch.
      return true
  }
  
  func makeRootViewLaunchScreen() {
      let mainStoryboard: UIStoryboard = UIStoryboard(name: "LaunchScreen", bundle: nil)
      let viewController = mainStoryboard.instantiateViewController(withIdentifier: "launchScreen")
      UIApplication.shared.keyWindow?.rootViewController = viewController
  }
  
  func stopDisplayingLaunchScreen() {
      let mainStoryboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
      let viewController = mainStoryboard.instantiateViewController(withIdentifier: "centralViewController") as? SearchResultsTableViewController
      viewController?.searchManager = searchManager
      UIApplication.shared.keyWindow?.rootViewController = viewController
      UIApplication.shared.keyWindow?.rootViewController?.navigationController?.isNavigationBarHidden = false
  }
  </code></pre>
  
  <p>As you can see I tried to use <code>UIApplication.shared.keyWindow?.rootViewController?.navigationController?.isNavigationBarHidden = false</code> to force the navigation bar to appear but it doesn't. My app still looks like this: <a href="https://i.stack.imgur.com/HpScK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HpScK.png" alt="what it looks like with missing navigation bar"></a></p>