Я нашел какое-то решение.Может быть, это кому-то помогает.Вот код:
func strikeThroughText (_ text:String) -> NSAttributedString {
let attributeString: NSMutableAttributedString = NSMutableAttributedString(string: text)
attributeString.addAttribute(NSAttributedStringKey.strikethroughStyle, value: 1, range: NSMakeRange(0, attributeString.length))
return attributeString
}
UIView.animate(withDuration: 0.1, animations: {
cell.transform = cell.transform.scaledBy(x: 1.5, y: 1.5)
}, completion: { (success) in
UIView.animate(withDuration: 0.3, delay: 0, usingSpringWithDamping: 0.7, initialSpringVelocity: 0.5, options: .curveEaseOut, animations: {
cell.transform = CGAffineTransform.identity
}, completion: nil)
})
Имеется .gif с примером attributeText