title: iOS - UISearchBar textfield background black on focus
body: <p>I have an issue with a UISearchBar. In the Storyboard its bar tint is set to clearColor, its Search Style to Minimal and Bar Style to Default. I have a custom background image too.</p>
  <p>This is how it looks like by default, when the view is first loaded:
  <a href="https://i.stack.imgur.com/Bcyqk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bcyqk.png" alt="enter image description here" /></a></p>
  <p>That's exactly how I want it to be.</p>
  <p>Now, when I press on it to type some text, here is what happens:</p>
  <p><a href="https://i.stack.imgur.com/goTgP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/goTgP.png" alt="enter image description here" /></a></p>
  <p>The background becomes black. If I cancel or stop the search, it goes back to image number one, perfectly.
  I have tried plenty of things, setting everything in code, but I can't seem to change this black background. I simply want it to be clear color.</p>