title: UISearchBar in a UIView Showing a White Border and Not Correctly Applying clearColor for tintColor and barTintColor
body: <p>I have a <code>UITableView</code> and a <code>UISearchBar</code> embedded within a <code>UIView</code>. The <code>searchBar</code> is positioned at the top and I am trying to achieve something which seems to be quite straight forward; I am trying to make the <code>UISearchBar</code> be transparent and take the colour of the background. </p>
  
  <p>Here's an example image. </p>
  
  <p><img src="https://i.stack.imgur.com/f0Yzl.png" alt="enter image description here"></p>
  
  <p>I have tried quite a number of things to no success. </p>
  
  <p>I set the barTint and the tintColor to clear:</p>
  
  <pre><code>self.nameAddSearchBar.barTintColor = [UIColor clearColor]; 
  self.nameAddSearchBar.tintColor = [UIColor clearColor]; 
  </code></pre>
  
  <p>I have tried setting the barMetrics:</p>
  
  <pre><code>[self.nameAddSearchBar setBackgroundImage:[UIImage imageNamed:@"Transparent.png"] forBarPosition:0 barMetrics:UIBarMetricsDefault];
  </code></pre>
  
  <p>I tried just</p>
  
  <pre><code>self.nameAddSearchBar.backgroundImage = [UIImage imageNamed:@"Transparent.png"]; 
  </code></pre>
  
  <p>But none of these are working. I can add a specific NavBar image I have:</p>
  
  <pre><code>self.nameAddSearchBar.backgroundImage = [UIImage imageNamed:@"GreenNav.png"]; 
  </code></pre>
  
  <p>That works perfectly but it looks odd because of the break in the image. Therefore, I just want this UISearchBar to be a clearColor so the background colour works through it. </p>
  
  <p>The UISearchBar is created in the storyboard and I have Translucent turned on. I have the bar tint, the background and the tint set to Clear colour, but in all cases, it's always with the white border in the image. </p>
  
  <p>Any guidance on this would be really appreciated. </p>