【发布时间】:2018-06-07 20:48:08
【问题描述】:
当我在 iOS7 中将 UISearchBar 设置为 minimal style 时,当我选择它时,色调变为黑色,并且文本无法阅读,因为黑色上有黑色。
这不会产生预期的结果。选择时色调仍然是黑色...
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];
}
【问题讨论】:
-
我猜你是在 UISearchBar 的后台事件上调用任何网络调用??
-
@MrWaqasAhmed 什么??不...
-
然后详细说明您的问题。
-
你愿意清除搜索栏的背景颜色吗..???
标签: ios objective-c uisearchbar