title: Delegate doesn't work using present() and dismiss()
body: <p>I'm trying to pass data from modal VC to parent VC using delegate. 
  This is the way I show second VC: </p>
  
  <pre><code>    let vc = UIStoryboard(name: "Stations", bundle: nil).instantiateViewController(withIdentifier: "StationsVC")
      let stations = StationsVC()
      stations.delegate = self
      present(vc, animated: true)
  </code></pre>
  
  <p>It has a delegate: </p>
  
  <pre><code>weak var delegate: SelectedStationDelegate?
  </code></pre>
  
  <p>Which is pretty simple: </p>
  
  <pre><code>protocol SelectedStationDelegate: class {
      func setSelectedStation(name: String, color: UIColor)
  }
  </code></pre>
  
  <p>Second VC sends data when I dismiss it: </p>
  
  <pre><code>private func sendSelectedStation(for indexPath: IndexPath) {
      if let indexPath = self.tableView.indexPathForSelectedRow {
          let cell = self.tableView.cellForRow(at: indexPath) as! StationCell
  
          guard let selectedStationName = cell.label.text else { return }
          guard let selectedStationColor = cell.circleView.backgroundColor else { return }
  
          dismiss(animated: true) {
              self.delegate?.setSelectedStation(name: selectedStationName, color: selectedStationColor)
          }
      }
  }
  </code></pre>
  
  <p>I thought maybe it doesn't capture any information, but it does — at least breakpoint says so.</p>
  
  <p>And first VC should accept it and change label's text and view's color: </p>
  
  <pre><code>extension MapVC: SelectedStationDelegate {
  
      func setSelectedStation(name: String, color: UIColor) {
          fromLabel.text = name
          print(name)
          print(fromLabel.text!)
          fromCircle.backgroundColor = color
      }
  }
  </code></pre>
  
  <p>But as you guessed — it doesn't. This function never executes. What is the problem? I suppose it's because of present()'ing and dismiss()'ing, but I couldn't find any information about using delegation without segues or navigation controllers at all :(</p>