给UILabel添加删除线

2021-10-29 10:17:55 浏览数 (1)

代码语言:javascript复制
let attributedText = NSAttributedString(string: "道之不存,师之所存也",
            attributes: [NSStrikethroughStyleAttributeName:1])
self.contentLabel.attributedText = attributedText

0 人点赞