Reputation: 721
I'm using UISearchBar
in my app its look likes below
I want UISearchBar
color to be clear color i tried the following
search.backgroundColor = [UIColor blackColor];
but the result is same can any one help me please.
Upvotes: 1
Views: 673
Reputation: 14523
UIColor *color = [UIColor redColor];
if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) {
searchBar.barTintColor = color; //for iOS 7
} else {
searchBar.tintColor = color; //for earlier than iOS 7
}
Upvotes: 0