Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove the 1px border under UISearchBar

UISearchBar 1px black border

I'm having trouble removing that 1px border directly under the UISearchBar view. Now it doesn't look matched up with my done button view. I've tried:

searchBar.layer.borderWidth = 0; searchBar.layer.shadowOpacity = 0; 

But that doesn't seem to be working. Any ideas?

like image 844
ninjaneer Avatar asked Jul 29 '11 03:07

ninjaneer


1 Answers

Nevermind, I just did:

searchBar.layer.borderWidth = 1; searchBar.layer.borderColor = [[UIColor whiteColor] CGColor]; 

and it works!

like image 163
ninjaneer Avatar answered Sep 22 '22 18:09

ninjaneer