UISearchBar文本颜色 [英] UISearchBar text color
本文介绍了UISearchBar文本颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
浏览文档,我找不到任何东西来改变UISearchBar的颜色。有人知道如何改变吗?没有任何textColor属性:/
Browsed the documentation and I couldn't find anything to change the color of UISearchBar. Does anybody know how to change it? There isn't any textColor property :/
Thx
推荐答案
iOS 8:请参阅 http://stackoverflow.com/a/28183058/308315
iOS 8: See http://stackoverflow.com/a/28183058/308315
iOS 6/7:
[[UITextField appearanceWhenContainedIn:[UISearchBar class], nil] setTextColor:[UIColor redColor]];
这篇关于UISearchBar文本颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文