使用的KVC的方法改变的textField的属性:
textField.placeholder=@"usernameisinhere!";
[textField setValue:[UIColorredColor] forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFontboldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];
使用的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
网友评论