title: presentingViewController not working
body: <p>I want to call a method on the presenting ViewController when I dismiss a popup ViewController. I start the Popup from the 'MainViewController' like this: (With help of EzPopup Library, but I think that shouldn't matter here)    </p>
  
  <pre><code>@IBAction func onStartWorkout(_ sender: UIButton) {
  
      let startWorkoutVC = storyboard!.instantiateViewController(withIdentifier: "CardContent") as! StartWorkout_ViewController
  
      let popupVC = PopupViewController(contentController: startWorkoutVC, popupWidth: 300, popupHeight: 500)
      popupVC.cornerRadius = 10
  
      present(popupVC, animated: true)
  }
  </code></pre>
  
  <p>then when I dismiss the Popup I do this:</p>
  
  <pre><code>func dissmissPopup()  {
      if let presenter = presentingViewController as? MainViewController {
          presenter.startWorkout(index: 0, isSNR: true)
      }
      self.dismiss(animated: true, completion: nil)
  }
  </code></pre>
  
  <p>But the method won't be called. How does presentingViewController work and why doesn't my reference to MainViewController work?</p>