NSString *priceString = [NSString stringWithFormat:@"原价:%@万", myModel.price];
NSMutableAttributedString *attributedString1 = [self setLabelAttriButeString:priceString andModelLength:myModel.price2.length];
[attributedString1 addAttribute:NSStrikethroughStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlinePatternSolid | NSUnderlineStyleSingle] range:NSMakeRange(0, priceString.length)];
- (NSMutableAttributedString *)setLabelAttriButeString:(NSString *)text andModelLength:(NSInteger)modelLength
{
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:text];
[attributedString addAttribute:NSForegroundColorAttributeName value:[UIColor orangeColor] range:NSMakeRange(3, modelLength)];
return attributedString;
}