利用KVC机制,为textField设置字体属性

看了标哥的博客,很牛。觉得自己也该慢慢的学会整理东西了。

textField.placeholder =@"here is name";

[textFieldsetValue:[UIColorpurpleColor]forKeyPath:@"_placeholderLabel.textColor"];

[textFieldsetValue:[UIFontboldSystemFontOfSize:20]forKeyPath:@"_placeholderLabel.font"];

你可能感兴趣的:(UITextField)