1. [textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];
2. [textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"]; iOS 修改textField的placeholder的字体颜色、大小
最新推荐文章于 2019-12-31 16:48:19 发布
本文介绍如何使用Swift对UITextField的占位符颜色和字体进行个性化设置,包括设置颜色为红色及字体加粗。
551

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



