UISearchBar更改占位符颜色 [英] UISearchBar change placeholder color
本文介绍了UISearchBar更改占位符颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有人知道如何更改UISearchBar占位符文本的文字颜色?
Has anyone any idea or code sample on how can I change the text color of the placeholder text of a UISearchBar?
推荐答案
for iOS5 +
使用外观代理
for iOS5+
use the appearance proxy
[[UILabel appearanceWhenContainedIn:[UISearchBar class], nil] setTextColor:[UIColor redColor]];
这篇关于UISearchBar更改占位符颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文