修改placeholder颜色
1、通过 attributedPlaceholder 属性
UIColor *color = ;
_userName.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"用户名" attributes:@{NSForegroundColorAttributeName: [UIColor whiteColor]}];
2、KVC
[_userName setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"];
网友评论