修改UITextField输入字符颜色
作者:
路这么长 | 来源:发表于
2016-11-18 16:08 被阅读19次用法👇
cell.upField.attributedPlaceholder = [self changePlaceholderColorwith:@"请输入用户名" Range:NSMakeRange(0, 6)];
- (NSMutableAttributedString *)changePlaceholderColorwith:(NSString *)str Range:(NSRange)range{
NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc]initWithString:str];
[attrString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHexString:@"#999999"] range:range];
return attrString;
}
本文标题:修改UITextField输入字符颜色
本文链接:https://www.haomeiwen.com/subject/rifspttx.html
网友评论