问题:UILabel中间画线

https://www.jianshu.com/p/9b322c034637

1
2
3
4
5
6
7
8
9
10
11


NSAttributedString *attrStr =
[[NSAttributedStringalloc]initWithString:_model.originPrice
attributes:
@{NSFontAttributeName:[UIFont systemFontOfSize:20.f],
NSForegroundColorAttributeName:[UIColor colorWithHexString:@"#5bcec0"],
NSStrikethroughStyleAttributeName:@(NSUnderlineStyleSingle|NSUnderlinePatternSolid),
NSStrikethroughColorAttributeName:[UIColor colorWithHexString:@"#5bcec0"]}];

self.orginPriceLabel.attributedText = attrStr;