title: Programmatically Pushing a ViewController
body: <p>I'm trying to push a ViewController programmatically.</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>var plus = UIButton()
  
  plus.addTarget(self, action: #selector(plusPressed), for: .touchUpInside)
  
  @objc func plusPressed() {
      print("plus")
      let createJournalVC = CreateJournalViewController()
      self.navigationController?.pushViewController(createJournalVC, animated: true)
  }
  </code></pre>
  
  <p><strong>What works:</strong></p>
  
  <ol>
  <li>Once the button is pressed, "plus" is printed to the console.</li>
  </ol>
  
  <p><strong>What doesn't work:</strong></p>
  
  <ol>
  <li>The ViewController is not pushed.</li>
  </ol>
  
  <p><strong>Details</strong></p>
  
  <ul>
  <li>I am using a Navigation Controller &amp; Tab Bar Controller.</li>
  <li>I am making this only programmatic, no storyboards.</li>
  <li>There is no error printed to the console, nothing actually happens.</li>
  </ul>