美文网首页iOS 开发 学习
ios 修改textField的placeholder的字体颜色

ios 修改textField的placeholder的字体颜色

作者: 清蘂翅膀的技术 | 来源:发表于2017-05-16 14:02 被阅读4次

使用的KVC的方法改变的textField的属性:

textField.placeholder=@"usernameisinhere!";

[textField setValue:[UIColorredColor] forKeyPath:@"_placeholderLabel.textColor"];

[textField setValue:[UIFontboldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];

相关文章

网友评论

    本文标题:ios 修改textField的placeholder的字体颜色

    本文链接:https://www.haomeiwen.com/subject/ucjlxxtx.html