给UILabel添加删除线

let attributedText = NSAttributedString(string: "道之不存,师之所存也",
            attributes: [NSStrikethroughStyleAttributeName:1])
self.contentLabel.attributedText = attributedText

编程技巧