您的位置:首页 > 其它

修改placeholder的字体颜色

2016-06-12 17:05 260 查看
第一种

UIColor *color = [UIColor whiteColor];

_userName.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"用户名" attributes:@{NSForegroundColorAttributeName: color}];

第二种

[_userName setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"];
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: