title: Pass data to and from Popover in Swift
body: <p>In my current project i have detail view that shows a specific record from my table view. I have the following labels</p>
  
  <pre><code>@IBOutlet weak var vacationImageView: UIImageView!
  @IBOutlet weak var percentSaved: UILabel!
  
  @IBOutlet weak var cost: UILabel!
  @IBOutlet weak var saved: UILabel!
  @IBOutlet weak var circleProgressView: CircularProgressView!
  
  @IBOutlet weak var daysDepart: UILabel!
  </code></pre>
  
  <p>I call a popover that I want to send the current text value of <strong>saved</strong> to my popup, allow the user to edit it and send it back to the view. Here is my popover call.</p>
  
  <pre><code>@IBAction func addPopover(sender: UIView) {
      let savingsInformationViewController = storyboard?.instantiateViewControllerWithIdentifier("SavingsAddPopover") as UIViewController
      savingsInformationViewController.modalPresentationStyle = .Popover
      savingsInformationViewController.preferredContentSize = CGSizeMake(200, 200)
  
  
  
      let popoverController = savingsInformationViewController.popoverPresentationController
      popoverController?.sourceView = sender
      popoverController?.permittedArrowDirections = .Any
      popoverController?.delegate = self
  
  
  
  
      presentViewController(savingsInformationViewController, animated: true, completion: nil)
  }
  </code></pre>
  
  <p>I would have thought I could reference the data object from the popover but can't..at least not the way I'm thinking. </p>