更新时间:2022-11-21 19:49:11
我用它来删除Xcode9/iOS11/Swift4 env中的文本
I use this to strike through a text in Xcode9/iOS11/Swift4 env
let strokeEffect: [NSAttributedStringKey : Any] = [
NSAttributedStringKey.strikethroughStyle: NSUnderlineStyle.styleSingle.rawValue,
NSAttributedStringKey.strikethroughColor: UIColor.red,
]
let strokeString = NSAttributedString(string: "text", attributes: strokeEffect)