iOS 修改textField的placeholder的字体颜色、大小
2014-10-28 16:23
507 查看
1.
textField.placeholder =
@"用户名";
[textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];
2.
UIColor *color = [UIColor whiteColor];
_userName.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"用户名"
attributes:@{NSForegroundColorAttributeName: color}];
textField.placeholder =
@"用户名";
[textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];
2.
UIColor *color = [UIColor whiteColor];
_userName.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"用户名"
attributes:@{NSForegroundColorAttributeName: color}];
相关文章推荐
- ios修改textField的placeholder的字体颜色、大小
- iOS 修改textField的placeholder的字体颜色、大小
- ios修改textField的placeholder的字体颜色、大小
- ios修改textField的placeholder的字体颜色、大小
- ios修改textField的placeholder的字体颜色、大小
- ios使用 KVC 修改textField的placeholder的字体颜色和大小
- iOS修改textField的placeholder的字体颜色大小
- ios修改textField的placeholder的字体颜色、大小
- ios修改textField的placeholder的字体颜色、大小
- ios修改textField的placeholder的字体颜色大小
- iOS开发-UI控件:修改textField的placeholder的字体颜色、大小
- iOS_ 修改textField的placeholder的字体颜色、大小
- ios中修改TextField的placeholder的字体颜色和大小
- ios修改textField的placeholder的字体颜色和大小
- ios设置字体-黑体,加粗等 修改textField的placeholder的字体颜色、大小
- ios修改textField的placeholder的字体颜色大小
- ios修改textField的placeholder的字体颜色、大小
- ios修改textField的placeholder的字体颜色、大小
- ios修改textField的placeholder的字体颜色大小
- ios修改textField的placeholder的字体颜色、大小