此需求主要是用来显示价格,实现打折效果
//中划线
NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
//下划线
NSDictionary *attribtDic = @{NSUnderlineStyleAttributeName: [NSNumbernumberWithInteger:NSUnderlineStyleSingle]};
NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:oldStrattributes:attribtDic];
oldPriceLabel.attributedText = attribtStr;