美文网首页
ios修改textField的placeholder的字体颜色、

ios修改textField的placeholder的字体颜色、

作者: 心情的颜色 | 来源:发表于2015-09-15 15:21 被阅读157次

textField.placeholder=@"username is in here!";

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

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

这里是使用了KVC的方式,是不是很简单呢?呵呵!

相关文章

网友评论

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

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