的UISearchBar barTintColor clearColor错误的iOS 8.0

的UISearchBar barTintColor clearColor错误的iOS 8.0

问题描述:

在我的应用我在厦门国际银行使用UISearchBarXcode 6.我已经给巴锡色清晰的色彩。它在下面的iOS 7.1上工作。的UISearchBar barTintColor clearColor错误的iOS 8.0

但主要问题是iOS 8.0它不工作鲜明的色彩。它显示黑色。

见图片

enter image description here

具有冒险精神的这个问题中的任何一个。

+0

对不起..我问巴锡颜色不是的backgroundColor。我也尝试过编程。 bar.barTintColor = [UIColor clearColor]; – Singapore 2014-09-11 10:31:03

+0

这个问题的任何解决方案为?.... – Singapore 2014-09-12 09:10:19

+0

同样的问题。在代码中设置不利于.. – 2014-09-12 09:49:20

我在搜索栏同样的问题,所以我改变了搜索风格默认为最小

它改变栏样式。

enter image description here

您可以添加一个1x1像素的透明图片作为背景图像的UISearchBar。 这将是一个肮脏的解决方法。我认为苹果应该解决这个问题。

+0

但它不是做的好方法... – Singapore 2014-09-13 12:23:12

你必须设置UISearchBar色调的颜色。

UISearchBar *search=[[UISearchBar alloc]initWithFrame:CGRectMake(10, 20, 100, 20)]; 
    [search setBarTintColor:[UIColor clearColor]]; 
    search.backgroundImage=[UIImage new]; 
    self.navigationItem.titleView=search; 

enter image description here