富文本中有中文字符會設(shè)置失效(10.3)
原因:可能是蘋果10.3系統(tǒng)的bug.
解決方法:讓富文本支持中文
NSBaselineOffsetAttributeName : @(NSUnderlineStyleSingle)
NSString *str = [NSString stringWithFormat:@"中文字符¥%@",@"9999"];
NSMutableAttributedString *attributeMarket = [[NSMutableAttributedString alloc] initWithString:str];
[attributeMarket setAttributes:@{NSStrikethroughStyleAttributeName: @(NSUnderlineStyleSingle), NSBaselineOffsetAttributeName : @(NSUnderlineStyleSingle)} range:NSMakeRange(0,str.length)];
_label.attributedText = attributeMarket;