ios修改textField的placeholder的字体颜色、
2015-09-15 本文已影响157人
心情的颜色
textField.placeholder=@"username is in here!";
[textField setValue:[UIColorredColor] forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFontboldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];
这里是使用了KVC的方式,是不是很简单呢?呵呵!