title: How to access my custom UIPresentationController from within presented controller?
body: <p>This is how I perform transitioning:</p>
  
  <pre><code>extension UIViewController: UIViewControllerTransitioningDelegate {
  
      public func presentationController(forPresented presented: UIViewController, presenting: UIViewController?, source: UIViewController) -&gt; UIPresentationController? {
          return OverlayPresentationController(presentedViewController: presented, presenting: presenting)
      }
  
      func presentOverlayController(_ controller: UIViewController) {
  
          controller.modalPresentationStyle = .custom
          controller.transitioningDelegate = self
  
          present(controller, animated: true)
      }
  } 
  </code></pre>
  
  <p>And then within my presented controller (<code>AlertVC</code>) at some point I need to access its presentation controller:</p>
  
  <pre><code>print(presentationController as? OverlayPresentationController) //nil
  print(presentationController) //is ok, UIPresentationController
  </code></pre>
  
  <p>Why?</p>
  
  <p>Presenting:</p>
  
  <pre><code>let controller = AlertVC.instantiate()
  controller.update()
  presentOverlayController(controller)
  
  class AlertVC: UIViewController {
  
      class func instantiate() -&gt; AlertVC {
          return UIStoryboard(name: "Alert", bundle: Bundle(for: LoginVC.classForCoder())).instantiateInitialViewController() as! AlertVC
      }
  
      func update() {
          _ = view
  
          print(presentationController as? OverlayPresentationController) //nil
      }
  }
  </code></pre>