0

Before updating the SDK to 7.1, my search bar looked like this:

enter image description here

I was using this code to achieve this affect:

searchBar.backgroundColor=[UIColor turquoiseColor];
[searchBar setBarTintColor:[UIColor clearColor]];

After updating to 7.1, now it looks like this:

enter image description here

If I change the second line of the above code to this:

[searchBar setBarTintColor:[UIColor turquoiseColor]];

Then I get this:

enter image description here

Which has a weird black border on the top and bottom. Any ideas on how to fix this?

James Harpe
  • 4,315
  • 8
  • 47
  • 74

1 Answers1

4

I had the same problem, for some reason this doesn't happen if you use an image, so what i did is just use a image with the color that i needed

[_searchBar setBackgroundImage:[UIImage imageNamed:@"backroundOfSearchBar"]]
MCMatan
  • 8,623
  • 6
  • 46
  • 85