I have a UISearchBar that is added to my view controller in a xib file.
I have the following properties set through Interface Builder:
barStyle = UIBarStyleDefault
searchBarStyle = UISearchBarStyleMinimal
translucent = YES
barTintColor = Clear Color
In code I'm styling the bar with this code, to make the text color white:
[[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setTextColor:[UIColor whiteColor]];
Also in my app delegate didFinishLoading method I have:
self.window.tintColor = [UIColor whiteColor];
My cancel button in the UISearchBar is a light grey. When I select it it highlights blue, which is jarring as it doesn't fit with any of the other visual elements in the screen. How can I change the button to highlight to a different color? Alternatively I would be fine if the cancel button was white and highlighted to a grey, like my navigation bar buttons do, but I don't know how to change the button color.
I'm targeting iOS7, using Xcode 5.
This answer seems appropriate, but it is having no effect for me https://stackoverflow.com/a/15791136/472344