【问题标题】:UISearchBar barTintColor not hiding in iOS 7.1UISearchBar barTintColor 没有隐藏在 iOS 7.1 中
【发布时间】:2014-07-07 06:26:42
【问题描述】:

在我的应用中,我在自定义UIView 中使用UISearchBar

下面是显示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 颜色并没有隐藏。

【问题讨论】:

  • backGroundImage 是做什么的?或者this 对你有帮助吗?
  • 是的。 [searchBar setBackgroundImage:[UIImage new]];有诀窍!!!

标签: ios objective-c ios7 uisearchbar ios7.1


【解决方案1】:

这似乎可以解决问题:

[searchBar setBackgroundImage:[UIImage new]];

【讨论】:

    猜你喜欢
    • 2015-02-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-07
    • 2014-04-14
    • 2014-04-25
    • 2014-04-16
    • 1970-01-01
    相关资源
    最近更新 更多