设置textField的placegolder的字体大小和字体颜色
2015-08-24 15:50
525 查看
因为项目的主题颜色为灰黑色,所以当使用textField的时候,placeholder内的字体默认是灰色,当程序运行的时候,几乎看不到.
翻来翻去找到一种比较简单地方法,只需要复制下面三行代码即可.
self.ttt.placeholder
= @"请输入用户名!";
[self.tttsetValue:[UIColorredColor forKeyPath:@"_placeholderLabel.textColor"];
[self.tttsetValue:[UIFontboldSystemFontOfSize:15 forKeyPath:@"_placeholderLabel.font"];
小小demo
翻来翻去找到一种比较简单地方法,只需要复制下面三行代码即可.
self.ttt.placeholder
= @"请输入用户名!";
[self.tttsetValue:[UIColorredColor forKeyPath:@"_placeholderLabel.textColor"];
[self.tttsetValue:[UIFontboldSystemFontOfSize:15 forKeyPath:@"_placeholderLabel.font"];
小小demo
相关文章推荐
- Algorithms—242.Valid Anagram
- GOOGLE校招的笔试题解析
- whatsup gold snmp安装脚本
- Algorithms—264.Ugly Number II
- STL学习----入门(1)[algorithm]
- Algorithms—263.Ugly Number
- Algorithms—268.Missing Number
- hdoj 1533 Going Home 【最小费用最大流】【KM入门题】
- Hierarchical Clustering(学习Free Mind知识整理)和Hungarian Algorithm
- leetcode: (21) Merge Two Sorted Lists
- 故障管理系统--select两级联动查询
- 使用Go快速创建静态服务
- C4D制作毛发舞动的Logo
- 加了GO后报 'GO' 附近有语法错误
- Unix 哲学:Elixir 将会替代 Go
- ORA-00932: inconsistent datatypes: expected NUMBER got CHAR
- GoldenGate碎碎念
- Benefits of Cold Showers: 7 Reasons Why Taking Cool Showers Is Good For Your Health
- GOF 23种设计模式目录
- django celery异步框架