title: iOS: How can I judge the state of UISearchBar?
body: <p>As the bellow pics: 
  There are 2 states for <code>UISearchBar</code>, how can I judge the searchBar's state?</p>
  
  <ol>
  <li>1th</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/86n2B.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/86n2B.png" alt="The 1th state"></a></p>
  
  <ol start="2">
  <li>2th</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/GwfBD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GwfBD.png" alt="The 2th state"></a></p>