我需要快速删除文本,我已经做到了这一点,NSMutableAttributedString
但水平显示。但我需要那个十字架
我的代码:
let attributeString: NSMutableAttributedString = NSMutableAttributedString(string: textLabel.text!)
attributeString.addAttribute(NSStrikethroughStyleAttributeName, value: 1, range: NSMakeRange(0, attributeString.length))
attributeString.addAttribute(NSStrikethroughColorAttributeName, value: colors.kSkyColor, range: NSMakeRange(0, attributeString.length))
textLabel.attributedText = attributeString