title: Navigation Bar Hidden, create own Back Button in Swift
body: <p>I am trying to create my own Back-Button.
  All my ViewControllers are in a Navigation Viewcontroller. But because I don't need the navigation bar I am hiding it. From the first ViewController I am coming with a button to the second ViewController. In the second ViewController I am trying to create a BackButton now on my own, but I don't know how to program the back function.</p>
  <pre><code>self.performSegue(withIdentifier: &quot;exitSegueStats&quot;, sender: self)
  </code></pre>
  <p>I tried it with this line. I am coming back to the previous page, but then my Button is disabled and I don't know why.</p>
  <pre><code>let MainVC = storyboard?.instantiateViewController(identifier: &quot;StatistikenMenu&quot;) as! StatistikViewControlelrViewController
      navigationController?.pushViewController(MainVC, animated: true)
  </code></pre>
  <p>And with those lines, I am coming back too, but then I create a infinity loop. So I mean I can swipe back and this should not be so.</p>
  <p>I know it is a little bit complicate, so I would really appreciate your help, thanks.</p>