遇到一些删除线才能正常工作的问题。目前,我正在执行以下操作:
theString.addAttributes([
NSAttributedStringKey.strikethroughStyle: NSUnderlineStyle.styleSingle.rawValue,
NSAttributedStringKey.strikethroughColor: UIColor.white
], range: NSMakeRange(0, 1))
Run Code Online (Sandbox Code Playgroud)
它没有显示任何形式的删除线。有任何想法吗?我似乎找不到任何有效的方法。