如果改变placeholder的颜色和字体大小

来源:互联网 发布:电路设计软件protel 编辑:程序博客网 时间:2024/04/27 23:27

使用kvc的方式对placeholder的颜色和字体大小进行修改

textField.placeholder = @"请输入验证码";  [textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];  [textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"]; 
0 0
原创粉丝点击