设置 UISearchBar 输入字体颜色 和 默认字体颜色
2015-10-16 15:01
204 查看
此博文转载自 /article/8530589.html
UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 210, 44)]; // Get the instance of the UITextField of the search bar UITextField *searchField = [searchBar valueForKey:@"_searchField"]; // Change search bar text color searchField.textColor = [UIColor blackColor]; // Change the search bar placeholder text color [searchField setValue:[UIColor blackColor] forKeyPath:@"_placeholderLabel.textColor"];
相关文章推荐
- iOS开发UI篇—CAlayer层的属性
- 对于dequeueReuseableCellWithIdentifier的个人见解
- iOS开发UI篇—CAlayer(创建图层)
- NGUI的原理机制
- iOS开发UI篇—CALayer简介
- iOS开发UI篇—Quartz2D使用(截屏)
- iOS开发UI篇—Quartz2D使用(信纸条纹)
- ios学习之利用纯代码来创建uiimageVIew
- UIStackView入门
- UI动画总结
- iOS开发UI篇—Quartz2D使用(绘图路径)
- iOS开发UI篇—Quartz2D简单使用(三)
- maven build报错解决方案
- iOS开发UI篇—Quartz2D使用(图片剪切)
- 最后查询方法:Last Query API-Medoo使用指南
- iOS开发UI篇—Quartz2D使用(矩阵操作)
- iOS开发UI篇—Quartz2D使用(图形上下文栈)
- iOS开发UI篇—Quartz2D简单使用(二)
- iOS开发UI篇—Quartz2D简单使用(一)
- iOS开发UI篇—Quartz2D简单介绍