ios 10.3 汉字的中划线

NSString *str = [NSString stringWithFormat:@"我是汉1233"];
NSMutableAttributedString *attributeMarket = [[NSMutableAttributedString alloc] initWithString:str];
[attributeMarket setAttributes:@{NSStrikethroughStyleAttributeName: @(NSUnderlineStyleSingle), NSBaselineOffsetAttributeName : @(NSUnderlineStyleSingle)} range:NSMakeRange(0,str.length)];
_label.attributedText = attributeMarket;


作者:rockyMJ
链接:http://www.jianshu.com/p/db6bc9a861a0
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
原文地址:https://www.cnblogs.com/lsh1234/p/7410270.html