在我的应用中,我使用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] 删除。
我来说两句