title: What function is called when a UIViewController is back in focus?
body: <p>I have single view application that also presents a custom popup which I have made using another viewController.  The popup viewController has the following assigned:</p>
  <pre><code> presentation: Over current context
  </code></pre>
  <p><a href="https://i.stack.imgur.com/5xwhg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5xwhg.png" alt="enter image description here" /></a></p>
  <p>when it is presented.  When I dismiss this popup viewController to show the first viewController, I would like to know what function gets called so that I can do more stuff within that function.  I have tested the following functions below but none of them are called when I have dismissed the popup to reveal the first viewController.</p>
  <pre><code>class firstViewController: UIViewController {
  
      override func viewWillAppear(_ animated: Bool) {
          super.viewWillAppear(animated)
      
          print(&quot;viewWillAppear PdfViewController...&quot;)   
      }
  
  
      override func viewDidLoad() {
          super.viewDidLoad()
      
          print(&quot;viewDidLoad PdfViewController ...&quot;)
      }
  }
  </code></pre>