title: Presenting a custom tab view controller but getting a black screen
body: <p>My goal is to display a tab view controller that manages multiple tabs that consist of navigation controllers containing view controllers. </p>
  
  <p>I set the tab view controller <code>BaseTabBarController</code> as window my root view controller in AppDelegate. My custom tab view controller looks like this:</p>
  
  <pre><code>class BaseTabBarController: ESTabBarController {
  
      override func viewDidLoad() {
          super.viewDidLoad()
          view.backgroundColor = .red
  
          let v1 = BaseNavigationController(rootViewController: SubscriptionsController())
          let v2 = BaseNavigationController(rootViewController: SubscriptionsController())
  
          v1.tabBarItem = ESTabBarItem(title: "Home", image: #imageLiteral(resourceName: "tab_bar_home"), selectedImage: #imageLiteral(resourceName: "tab_bar_home"))
          v2.tabBarItem = ESTabBarItem(title: "Home", image: #imageLiteral(resourceName: "tab_bar_home"), selectedImage: #imageLiteral(resourceName: "tab_bar_home"))
  
          self.viewControllers = [v1, v2]
          self.hidesBottomBarWhenPushed = true
      }
  }
  </code></pre>
  
  <p>My custom navigation controller class is an empty subclass of a navigation controller.</p>
  
  <p>The problem is that the app displays a tab bar for a fraction of a second, and immediately turns into a black screen (console message: "Presenting view controllers on detached view controllers is discouraged"). What did I do wrong?</p>