title: Why searchBarTextDidEndEditing not called?
body: <p>I have this code:</p>
  
  <pre class="lang-swift prettyprint-override"><code>extension VC : UISearchBarDelegate
  {
      func searchBarTextDidEndEditing(_ searchBar: UISearchBar) {
          print("searchBarTextDidEndEditing")
      }
  
      func searchBarCancelButtonClicked(_ searchBar: UISearchBar) {
          // searchBar.resignFirstResponder()
      }
  }
  </code></pre>
  
  <p><code>searchBarCancelButtonClicked</code> has fired when clicked on search , but <code>searchBarTextDidEndEditing</code> has not fire until I call  <code>searchBar.resignFirstResponder()</code></p>
  
  <p>I read a lot of questions and answers about that, but I did not understand why is that happen, and what is <code>resignFirstResponder()</code> do here?</p>