title: Get UIPopoverController reference in prepareForSegue?
body: <p>I have selected <code>Present as Popover</code> in Interface Builder for my StoryBoard Segue.</p>
  
  <p><img src="https://i.stack.imgur.com/WJsFv.png" alt="enter image description here"></p>
  
  <p>How can I get reference to UIPopoverController in <code>prepareForSegue</code>?</p>
  
  <p>I tried like this, but it not goes inside the if statement.</p>
  
  <pre><code>    if segue is UIStoryboardPopoverSegue {
          let popoverSegue = segue as UIStoryboardPopoverSegue
          simpleTableViewController.popoverController = popoverSegue.popoverController
      }
  </code></pre>
  
  <h1>UPDATE</h1>
  
  <p>If you need popovercontroller, just to dismiss it, then the way to dismiss an adaptive view controller is:</p>
  
  <pre><code>self.dismissViewControllerAnimated(true, completion: nil)
  </code></pre>