iOS 开发 学习

ios 修改textField的placeholder的字体颜色

2017-05-16  本文已影响4人  清蘂翅膀的技术

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

textField.placeholder=@"usernameisinhere!";

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

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

上一篇 下一篇

猜你喜欢

热点阅读