iOS searchbar textfield placeholder color
// Get the instance of the UITextField of the search bar UITextField *searchField = [searchBar valueForKey:@"_searchField"]; // Change search bar text color
searchField.textColor = [UIColor redColor]; // Change the search bar placeholder text color
[searchField setValue:[UIColor blueColor] forKeyPath:@"_placeholderLabel.textColor"]; //Change search bar icon if needed
[self.searchBar setImage:[UIImage imageNamed:@"searchIcon"]
forSearchBarIcon:UISearchBarIconSearch
state:UIControlStateNormal]; [self.searchBar setValue:[UIColor whatever] forKeyPath:@"_searchField._placeholderLabel.textColor"];
iOS searchbar textfield placeholder color的更多相关文章
- ios修改textField的placeholder的字体颜色和大小
textField.placeholder = @"username is in here!"; [textField setValue:[UIColor redColor] fo ...
- ios修改textField的placeholder的字体颜色、大小
textField.placeholder = @"username is in here!"; [textField setValue:[UIColor redColor] fo ...
- iOS 限制TextField输入长度(标准)
iOS 限制TextField输入长度(标准) 网上有很多限制textField输入长度方法,但是我觉得都不是很完美,准确来说可以说是不符合实际开发的要求,因此在这里整理一下textField限制输入 ...
- 设置 textField.placeholder的颜色和大小
textField.placeholder = @"请输入手机号码"; [textField setValue:[UIColor blue] forKeyPath:@"_ ...
- [HTML] Change an HTML5 input's placeholder color with CSS
We will look at what CSS selectors to use to change an HTML5 inputs placeholder color. This can diff ...
- IOS开发 - TextField 控件详细
//初始化textfield并设置位置及大小 UITextField *text = [[UITextField alloc]initWithFrame:CGRectMake(20, 20, 130, ...
- 转发:iOS之textfield用法大全
转发至:http://m.blog.csdn.net/article/details?id=8121915 //初始化textfield并设置位置及大小 UITextField *text = [[U ...
- iOS UITextField设置placeholder颜色
设置UITextField的placeholder颜色 UIColor *color = [UIColor blackColor]; textField.attributedPlaceholder = ...
- IOS searchBar去掉背景
修改UISearchBar的背景颜色 UISearchBar是由两个subView组成的,一个是UISearchBarBackGround,另一个是UITextField. 要IB中没有直接操作背景的 ...
随机推荐
- C#环境
- Python学习笔记——条件和循环
1.条件表达式 >>> x = 3 >>> x = 1 if x<3 else 2 >>> x 2 2.for语句用于序列类型 <1& ...
- [Unity3d]3D项目转换为VR项目(暴风魔镜SDK)
使用暴风魔镜SDK来操作 将魔镜的摄像头拖放到项目中: 将MoJingVrHead的Script剪切到CamRoot中: 这个时候能看到显示2个物体了,不过使用的Canvas还是显示一个: 调整Can ...
- [Nhibernate]SchemaExport工具的使用(二)——创建表及其约束、存储过程、视图
目录 写在前面 文档与系列文章 表及其约束 存储过程 视图 总结 写在前面 由于一直在山西出差,有几天没更新博客了.昨晚回到家,将博客园最近三天更新的文章搜集了一下,花费了半天的时间,看了看,有些文章 ...
- Computer Vision: OpenCV, Feature Tracking, and Beyond--From <<Make Things See>> by Greg
In the 1960s, the legendary Stanford artificial intelligence pioneer, John McCarthy, famously gave a ...
- MySQL Cluster 7.3.5 集群配置参数优化(优化篇)
按照前面的教程:MySQL Cluster 7.3.5 集群配置实例(入门篇),可快速搭建起基础版的MySQL Cluster集群,但是在生成环境中,还是有很多问题的,即配置参数需要优化下, 当前生产 ...
- windows vim修改字体
C:\Program Files (x86)\Vim\vim74 目录下,在vimrc_example.vim和mswin.vim中添加: set guifont=Consolas:h11
- 如何查看oracle 的package源码
select text from dba_source t where t.TYPE = 'PACKAGE BODY' and name ='EMR_RECORD_INPUT' order by li ...
- mac 下修改jenkins的 端口号
sudo defaults write /Library/Preferences/org.jenkins-ci httpPort 7070
- 1.MongoDB报错 Failed to connect 127.0.0.1:27017 Mongo运行错误
1.Mongo运行错误:Failed to connect 127.0.0.1:27017 Mongo运行错误:Failed to connect 127.0.0.1:27017,reason:err ...