title: Swift: Perform a function on ViewController after dismissing modal
body: <p>A user is in a view controller which calls a modal. When self.dismissViewController is called on the modal, a function needs to be run on the initial view controller. This function also requires a variable passed from the modal.</p>
  
  <p>This modal can be displayed from a number of view controllers, so the function cannot be directly called in a viewDidDisappear on the modal view.</p>
  
  <p>How can this be accomplished in swift?</p>