UISearchBar barTintColor没有隐藏在iOS 7.1中

罗纳德·兰登

在我的应用中,我使用UISearchBar的是custom UIView

以下是显示的代码UISearchBar

searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(50, 135, 230, 32)];
searchBar.barTintColor = [UIColor clearColor];
searchBar.placeholder = @"Search";
[self addSubview:searchBar];

iOS 7.0.3中,bartint颜色未显示,

在此处输入图片说明

但是,在iOS 7.1中,Bartint颜色不会隐藏。

在此处输入图片说明

意义事项

看来这可以解决问题:

[searchBar setBackgroundImage:[UIImage new]];

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章