I know how to remove/change UISearchBar background color around search field:
[[self.searchBar.subviews objectAtIndex:0] removeFromSuperview];
self.searchBar.backgroundColor = [UIColor grayColor];

But don’t know how to do this inside it like that:

This needs to be compatible with iOS 4.3+.
Use this code to change the searchBar’s
UITextFieldbackgroundImage:Use the below code to change the
UISearchBarIcon:Also, to change the searchBar icon you can use the following built-in method on
UISearchBar(which is available from iOS 5+):Here you can set 4 types of
UISearchBarIconi.e.:UISearchBarIconBookmarkUISearchBarIconClearUISearchBarIconResultsListUISearchBarIconSearchI hope this help you…