您的位置:首页 > 产品设计 > UI/UE

修改UITextField的placeHolder的颜色及字体大小

2016-08-10 14:44 489 查看
[_emailPwdTF setValue:GET_COLOR(@"#b3b6be") forKeyPath:@"_placeholderLabel.textColor"];

[_emailPwdTF setValue:GET_FONT(15) forKeyPath:@"_placeholderLabel.font"];

注:第二种方法(颜色)

UIColor *color = [UIColor whiteColor];

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

参考博客:/detail/2619606985.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息