【发布时间】:2014-06-26 16:42:57
【问题描述】:
我正在尝试将 barTintColor 的 UISearchBar 设置为不透明。但是,设置 translucent 属性似乎没有任何作用。我已经在bare-bones Xcode project here 中重现了这个问题。
self.searchDisplayController.searchBar.translucent = NO;
self.searchDisplayController.searchBar.barTintColor = [UIColor redColor];
上面的红色和UIViews中的[UIColor redColor]不一样,不是半透明的。我知道涉及在搜索栏上设置背景图像的解决方法,但上面的代码应该也可以。
【问题讨论】:
标签: ios objective-c ios7 uisearchbar bartintcolor