title: How to call a function defined in main ViewController from secondary view controller in swift without using delegates?
body: <p>How can I call the playAgain() function which is defined in ViewController, from DisplayScoreController ?</p>
  
  <p>ViewController.swift</p>
  
  <pre><code>class ViewController: UIViewController {
  
      func playAgain() {
          print("Play Again")
      } 
  }
  </code></pre>
  
  <p>DisplayScoreController.swift</p>
  
  <pre><code>class DisplayScoreController: UIViewController {
  
      @IBAction func playAgain(_ sender: Any) {
          dismiss(animated: true, completion: nil)
  
      // I want to call playAgain() in ViewController
  }
  </code></pre>