修改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
[_emailPwdTF setValue:GET_FONT(15) forKeyPath:@"_placeholderLabel.font"];
注:第二种方法(颜色)
UIColor *color = [UIColor whiteColor];
_emailPwdTF.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"用户名" attributes:@{NSForegroundColorAttributeName: color}];
参考博客:/detail/2619606985.html
相关文章推荐
- 修改UItextField输入框placeholder的字体默认颜色和大小,采用KVC方式设置
- iOS 修改UITextField 的placeholder字体大小和颜色
- (iOS开发)修改UITextField中placeholder的字体大小,颜色
- iOS修改UITextField的提示语(placeholder)的字体大小和颜色
- iOS-修改UITextField的placeholder字体颜色、大小
- swift修改UITextfield的Placeholder字体大小和颜色
- iOS开发修改UITextField的placeholder的颜色字体大小等
- iOS开发~修改UITextField的placeholder的字体大小、颜色
- iOS修改UITextField的placeholder的字体颜色大小
- ios修改textField的placeholder的字体颜色、大小
- 【iOS开发】修改UITextfield的Placeholder字体的颜色
- ios中修改TextField的placeholder的字体颜色和大小
- ios修改textField的placeholder的字体颜色和大小
- 修改UITextfield的Placeholder字体的颜色
- ios修改textField的placeholder的字体颜色和大小
- (iOS开发)修改textfeiled中placeholder的字体,颜色,大小
- 修改UITextfield的Placeholder字体的颜色
- ios修改textField的placeholder的字体颜色、大小
- 修改textFieldplaceholder字体颜色和大小
- [iOS]修改UITextfield的Placeholder字体的颜色