title: Segue from popup ViewController Swift
body: <p>I have app with 7 screens(VC) which are embedded in navigation controller. </p>
  
  <p>And I have one separate VC that is not embedded. This VC is acting like custom popup <code>class PopupView: UIViewController {}</code> and get's called by pressing button from every screen that I have in my app using custom segue (setup as custom segue in storyboard): </p>
  
  <pre><code>open class MIBlurPopupSegue: UIStoryboardSegue {
  
  open override func perform() {
      MIBlurPopup.show(destination, on: source)
  } }
  </code></pre>
  
  <p>In this popup there's a button that should open another VC (VC always the same) that is embedded in navigation stack.</p>
  
  <p>What I'm trying to achieve is to actually open that VC that is inside navigation stack by pressing button in Popup VC and then get back to the screen where Popup was called.</p>
  
  <p>So, user journey will look like - Opened VC1(2,3,5,6,7) -> Called popup VC -> Pressed button -> opened  VC4 -> pressed navigation back button -> returned to VC1.</p>
  
  <p>I what I have right now:</p>
  
  <ul>
  <li><p>Connected in storyboard all 6 screens to VC4, with segues ids</p></li>
  <li><p>Tried <code>performSegue(withIdentifier: "toVC4")</code>,  <code>present(vc, animated: true, completion: nil)</code></p></li>
  <li><p><code>let storyboard = UIStoryboard(name: "MyStoryboardName", bundle: nil)
  let controller = storyboard.instantiateViewController(withIdentifier: "VC4")
  self.present(controller, animated: true, completion: nil)</code></p></li>
  <li><p>Using protocols to call func in VC1 but failed.</p></li>
  </ul>
  
  <p>I'm definitely missing something and would be very thankful if someone could provide code sample to solve this issue. </p>