title: How to resign a search bar as a first responder without selecting table view's cells?
body: <p>I have a table view with a search bar on top of it. I would like to implement the following behaviour: when the search bar is tapped and then a user taps anywhere else, the search bar resigns of being a first responder (keyboard is hidden), but at the same time, cells of the table view are not getting selected. I don't use another view for searching. Here is how my table view with a search bar looks like (I know, there is a problem with separators of a table view when I run my project on a simulator. Can't figure out why):</p>
  
  <p><a href="https://i.stack.imgur.com/bsuuc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bsuuc.png" alt="enter image description here"></a></p>
  
  <p>Currently, when I tap somewhere else, search bar resigns of being the first responder, but the problem is, the cells are getting selected, too. That would be ok, but sometimes, when I have more complex cells (not like the ones in the image), the transition between views is not very smooth. If you know a way how to make the transition smooth, that would be ok, too, or, I would appreciate any suggestion about implementing the behaviour, described above.</p>