ios 10.3+ 系統(tǒng)炸渡,NSAttributedString 里設(shè)置 文字中間劃線娜亿,只要含有漢字就會不顯示中間線。目測是ios10.3+系統(tǒng)的bug偶摔。ios11和ios10.2 就沒這個問題暇唾。
修改方法:添加設(shè)置 NSBaselineOffsetAttributeName:@(NSUnderlineStyleSingle)
例如:
1.NSAttributedString ?*attrStr =
[[NSAttributedString alloc]initWithString:textStr attributes:
@{NSFontAttributeName:SYS_FONT(17),
NSForegroundColorAttributeName:RSQColorFromHex(0xa3a3a3),
NSStrikethroughStyleAttributeName:@(NSUnderlineStyleSingle),
NSStrikethroughColorAttributeName:RSQColorFromHex(0xa3a3a3),
NSBaselineOffsetAttributeName:@(NSUnderlineStyleSingle)
}];