When I set my UISearchBar
to minimal style
in iOS7, when I select it the tint becomes black, and the text is impossible to read because there's black on black.
This does not produce the desired result. The tint is still black when selected...
if(floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1)
{
// set bar style
_sendToSearchBar.barStyle = UIBarStyleDefault;
// set bar transparancy
_sendToSearchBar.translucent = NO;
// set bar color
_sendToSearchBar.barTintColor = [UIColor whiteColor];
// set bar button color
_sendToSearchBar.tintColor = [UIColor whiteColor];
// set bar background color
_sendToSearchBar.backgroundColor = [UIColor whiteColor];
}
I had same problem and tried for few hours, the conclusion is UISearchBar are quite buggy ! Especially in "minimal" mode.
My workaround is :
[UIColor clearColor]
[UIColor blackColor]
[UIColor whiteColor]
The search bar looks like minimal mode in normal, and the background will be white when selected, so you can see the black color text.
The workaround isn't perfect, it just work, hope can help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With