第一种 [_titleField setValue:[UIColor text2Color] forKeyPath:@"_placeholderLabel.textColor"];
第二种 UIColor *color = [UIColor colorForCsWordColor];
_titleField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"密码" attributes:@{NSForegroundColorAttributeName: color}];
iOS TextField改变placeholder颜色的方法
最新推荐文章于 2020-04-27 11:33:53 发布
