title: Skip/Add a View Controller in Navigation Stack
body: <p>I have three View Controllers embedded in Navigation Controller. I want to go from VC1 to VC3 so that in VC3 the Navigation Item's back button would direct the user to VC2 instead of VC1. I think this should be done either by <em>adding the VC2 to the Navigation Stack between VC1 and VC3</em> when VC3 is created or by <em>skipping the second View Controller</em>.</p>
  
  <p>I tried this:</p>
  
  <pre><code>override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
      if let identifier = segue.identifier {
          switch identifier {
          case "JumpToThirdVCSegue":
              if let secondvc = segue.destinationViewController as? SecondViewController {
                  secondvc.performSegueWithIdentifier("ThirdVCSegue", sender: self)
              }
          default: break
          }
      }
  }
  </code></pre>
  
  <p>but I couldn't get it working. Perhaps performing a segue isn't possible when the View Controller isn't open yet?</p>
  
  <p>What is the best way to skip a View Controller / add a View Controller in the middle of Navigation Stack? I hope this helps you to understand what I'm trying to do:</p>
  
  <p><a href="https://i.stack.imgur.com/qtNP1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qtNP1.png" alt=""></a></p>