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
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

posted on 2017-08-22 10:15  开花结果乐园  阅读(113)  评论(0编辑  收藏  举报

导航