如何自定义UISearchBar的外观 [英] How to customize appearance of UISearchBar
本文介绍了如何自定义UISearchBar的外观的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想自定义搜索栏,我的意思是白框.我可以做吗? 是否有一些有关的文档? 有没有一种方法可以隐藏白色框,但不能隐藏字母. 我至少可以把盒子缩小吗?我的意思是身高较小
I want to customize the search bar, I mean the white box. Can I do it? Is there some documentation about that? Is there a way to hide the white box, but not the letters. Can I at least make the box smaller? I mean less height
推荐答案
通过IOS 5.0,您就有机会使用
By IOS 5.0 you have the chance to use
[[UISearchBar appearance] setSearchFieldBackgroundImage:[UIImage imageNamed:@"searchbar.png"]forState:UIControlStateNormal];
这篇关于如何自定义UISearchBar的外观的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文