设置textfield的placeholder的字体和颜色
2015-07-31 13:24
471 查看
设置textfield的placeholder的字体和颜色
UITextField *textField = [[UITextField
alloc] initWithFrame:CGRectMake(10,
30, 300,
150)];
textField.placeholder =
@"this is a textField";
[textField setValue:[UIColor
redColor]
forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFont
boldSystemFontOfSize:30]
forKeyPath:@"_placeholderLabel.font"];
textField.borderStyle =
UITextBorderStyleRoundedRect;
[self.view
addSubview:textField];
UITextField *textField = [[UITextField
alloc] initWithFrame:CGRectMake(10,
30, 300,
150)];
textField.placeholder =
@"this is a textField";
[textField setValue:[UIColor
redColor]
forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFont
boldSystemFontOfSize:30]
forKeyPath:@"_placeholderLabel.font"];
textField.borderStyle =
UITextBorderStyleRoundedRect;
[self.view
addSubview:textField];
相关文章推荐
- Qt - OpenCV的安装与配置 (win7 64 bit + OpenCV3.0 + minGW32)
- 致远协同软件手机版让移动办公不再是梦想
- HDOJ丶 1005(Number Sequence)
- 联科手游技术支持
- CDOJ丶数字三角形
- The Future of JavaScript MVC Frameworks
- 搜索技术博客-淘宝
- 13. Window blur() 方法
- js 实现飘浮
- 淘宝技术部
- Spring源码:Spring 容器资源加载模板模式应用
- HDOJ丶水题大放送
- 爱挑剔的acm程序员 acmer
- CentOS6.6配置iptables
- Linux下Redis服务器安装配置
- HDU 5336 XYZ and Drops (模拟+搜索,详解)
- OA办公流程
- 销售部OA流程
- js运动框架
- Eclipse报错:java.lang.ClassNotFoundException: ContextLoaderListener