title: Swift : show searchbar when scroll up and hide it when scroll down
body: <p>I am new to Ios develpomment,
  I added a <code>Searchbar</code> into the navigation item
  What I would like to implement is when I scroll Up the <code>tableview</code> 
  I want to hide the <code>Searchbar</code> and when show it when I scroll down</p>
  
  <p>Like safari effect on iPAD /Iphone where the address bar is hiding when scrolling Down and showing when scrolling Up</p>
  
  <pre><code>  let searchController = UISearchController(searchResultsController: nil)
    searchController.searchResultsUpdater = self
    searchController.obscuresBackgroundDuringPresentation = false
    navigationItem.searchController = searchController
    definesPresentationContext = true 
  </code></pre>
  
  <p>thank your for helping.</p>