iOS13及以上,富文本删除线失效
2020-11-17 本文已影响0人
iOS_我更专业
Swift写法:
var aAttribute:[NSAttributedStringKey:Any] = [NSAttributedStringKey.strikethroughStyle:NSUnderlineStyle.styleThick.rawValue,
NSAttributedStringKey.strikethroughColor: UIColor.white]
if#available(iOS10.3, *) {
aAttribute[NSAttributedStringKey.baselineOffset] =0
}