标签:mutable value mode under attr rgb attribute format app
UILabel *valueL = [JAppViewTools getLabel:CGRectMake(JFWidth(15), CGRectGetMaxY(proName.frame)+JFWidth(12), KSCreenWidth-JFWidth(30), JFWidth(14)) :JTextFCMake(JFFont(15), rgb(28, 218, 159))]; valueL.text = [NSString stringWithFormat:@"%@ 金币 ¥%@",proModel.integration,proModel.price]; NSMutableAttributedString *attributeStr = [[NSMutableAttributedString alloc]initWithString:valueL.text]; NSRange range1 = {valueL.text.length-proModel.price.length-1,proModel.price.length+1}; //字体颜色 [attributeStr addAttribute:NSForegroundColorAttributeName value:RGBlightGrayColor range:range1];
//删除线 [attributeStr addAttribute:NSStrikethroughStyleAttributeName value: @(NSUnderlineStyleSingle) range:range1]; valueL.attributedText = attributeStr;
标签:mutable value mode under attr rgb attribute format app
原文地址:https://www.cnblogs.com/lishanshan/p/9224429.html