修改UItextField输入框placeholder的字体默认颜色和大小,采用KVC方式设置
[_textField setValue:[UIColor getCommonColorWithColorType:ColorWhiteType] forKeyPath:@"_placeholderLabel.textColor"];
[_textField setValue:[UIFont getCommonFontWithFontType:SmallFontType] forKeyPath:@"_placeholderLabel.font"];
本文介绍如何使用KVC方式来调整UITextField输入框的占位符颜色和字体大小,通过简单两行代码实现自定义样式。
6883

被折叠的 条评论
为什么被折叠?



