设置textField placeholder的颜色方法:
//第一种
UIColor *color = [UIColor whiteColor];
_textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"用户名" attributes:@{NSForegroundColorAttributeName: color}];
//第二种
[_textField setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"];

本文详细介绍了如何在iOS开发中设置textFieldplaceholder的颜色,并提供了两种实现方式。
1061

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



