uitextfield placehold 颜色
2016-05-03 11:40
489 查看
//第一种
UIColor *color = [UIColor whiteColor];
_userName.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"用户名" attributes:@{NSForegroundColorAttributeName: color}];
//第二种
[_userName setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"];
UIColor *color = [UIColor whiteColor];
_userName.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"用户名" attributes:@{NSForegroundColorAttributeName: color}];
//第二种
[_userName setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"];
相关文章推荐
- easyui 日期范围前后台的设置以及实现
- kendo ui grid 高度自适应
- 【Android UI】动态改变ListView布局
- CoreThink主题开发(七)使用H-ui开发博客主题之新闻资讯正文页面
- 知问前端——日历UI(三)
- easyUI获取index值以及修改某列的值
- 【Android UI】具有弹性的ListView
- ios上 更改 状态栏(UIStatusBar)的颜色
- 使用NSOperation以及NSOperationQueue
- UIView的autoresizingMask属性的研究
- UIBezierPath精讲
- Unknown table ‘system_sequences’ in information_schema错误解决
- leetcode 347. Top K Frequent Elements
- NSDictionary中取出value的值赋给float型
- FluentData -Micro ORM with a fluent API that makes it simple to query a database
- android学习笔记---UI布局
- UIView 中常见的方法总结
- 【Android UI】自动显示、隐藏布局的ListView
- Null value was assigned to a property of primitive type setter of
- vue.js-step-everthing-3