//修改价格字体
NSMutableAttributedString *textColor = [[NSMutableAttributedString alloc]initWithString:_priceLB.text];
NSRange rangel = [[textColor string] rangeOfString:[_priceLB.text substringWithRange:NSMakeRange(0, 1)]];
[textColor addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:rangel];
[textColor addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:11] range:rangel];
[_priceLB setAttributedText:textColor];
日常知识总结之-修改字体大小和颜色
最新推荐文章于 2024-02-29 22:45:34 发布