title: How to dismiss a popover from parent in swift
body: <p>I am new to iOS and swift. I'm trying to show a popover. I have managed to show a popover but the problem is I need to dismiss it from the parent.</p>
  
  <p>I can dismiss the popover from the ViewController itself using this code</p>
  
  <pre><code>self.dismissViewControllerAnimated(true, completion: nil)
  </code></pre>
  
  <p>But I need to do this from the parent view controller. </p>
  
  <p>I have done this so far. On button click
      performSegueWithIdentifier("bookingPopOverSegue", sender: self)</p>
  
  <p>on prepareForSegue,</p>
  
  <pre><code>if segue.identifier == "bookingPopOverSegue" {
  
          var bookingViewController = segue.destinationViewController as! BookingViewController
          var passthroughViews: [AnyObject] = self.timeSlotButtons
          passthroughViews.append(self.scrollView)
          bookingViewController.popoverPresentationController?.passthroughViews = passthroughViews
      }
  </code></pre>
  
  <p>Any idea on how to do this? Any help would be appreciated..</p>