title: Using Tab Bar Controller and Navigation Controller
body: <p><a href="https://i.stack.imgur.com/x4EWV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x4EWV.png" alt="enter image description here"></a></p>
  
  <p>I want to navigate between view controllers as it is shown. I do not want to use segues. </p>
  
  <p>When I try to navigate form <code>FirstViewController</code> to <code>SecondViewController</code> by clicking a button: </p>
  
  <pre><code> let next = self.storyboard?.instantiateViewControllerWithIdentifier("secondViewController") as! SecondViewController
  
   self.presentViewController(next, animated: true, completion: nil)
  </code></pre>
  
  <p>I get: </p>
  
  <blockquote>
    <p>Warning: Attempt to present SecondViewController on FirstViewController whose view is not in the window hierarchy!</p>
  </blockquote>
  
  <p>Any ideas how to insert Navigation Controllers in-between? </p>
  
  <p><strong>Edit:</strong> It is <code>TabBarController</code> not <code>TabViewController</code> on the figure.</p>
  
  <p>I navigate from First Scene's controller named "A-Controller" to First View Controller with : </p>
  
  <pre><code>@IBAction func navigateToFirstViewController(sender: AnyObject) {
      let next = self.storyboard?.instantiateViewControllerWithIdentifier("firstViewController") as! FirstViewController
      self.presentViewController(next, animated: true, completion: nil)
  }
  </code></pre>
  
  <p>It is not shown on the figure.</p>