**Edit - This worked for me in iOS 7
// Set the color to whatever blue color that is in your screenshot
self.searchBar.backgroundImage = [UIImage imageWithColor:[UIColor redColor] cornerRadius:5.0f];
If you want all of your search bar's to be a certain color do this:
// Put this in your app delegate's didFinishLaunchingWithOptions method
// Whatever color you want for searchBarColor
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { // For iOS 7
UIColor *searchBarColor = [UIColor blueColor];
[[UISearchBar appearance] setBackgroundColor:searchBarColor];
}
If you just want that particular search bar background to be a color:
// Set it in your viewDidLoad method of your controller
// Replace the yourSearchBar property with whatever you're doing to instantiate the search bar
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7) { // For iOS 7
{
UIColor *searchBarColor = [UIColor blueColor];
self.yourSearchBar.backgroundColor = searchBarColor;
}