//在字符串中加上删除线
- (void)setdeleteLine{
NSString * string = @"价格 ¥";
NSString * LabelString ;
NSInteger i;
LabelString = [string stringByAppendingString:self.discountMoney];
i = self.discountMoney.length;
NSMutableAttributedString * testString = [[NSMutableAttributedString alloc] initWithString:LabelString];
[testString addAttribute:NSStrikethroughStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:NSMakeRange(4, i)];
self.priceLabel.attributedText = testString;
}
//拼接不同颜色的字符串
- (void)setbannerText {
self.HBBanner.textColor = [UIColor whiteColor];
NSMutableAttributedString * string = [[NSMutableAttributedString alloc] initWithString:self.bannerText];
[string addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHex:0xfff587] range:NSMakeRange(9, 4)];
self.HBBanner.attributedText = string;
}