label添加中划线

 label.text = [NSString stringWithFormat:@"原价:¥%@",_forePrice];

NSDictionary*attribtDic=@{NSStrikethroughStyleAttributeName:[NSNumber numberWithInteger:NSUnderlineStyleSingle]};


NSMutableAttributedString*attStr=[[NSMutableAttributedString alloc]initWithString:label.text attributes:attribtDic];

label.attributedText = attStr;

猜你喜欢

转载自blog.csdn.net/u012498386/article/details/80780709
今日推荐