Hi
Since I upgraded to ios13 i have a problem running this piece of code
let text = cell.statusTitleLabel.attributedText as! NSMutableAttributedString
text.addAttribute(NSAttributedString.Key.strikethroughStyle, value: 1, range: NSMakeRange(0, text.length))
cell.statusTitleLabel.attributedText = text
cell.isUserInteractionEnabled = false
The line 1 throws the error of cast exception:
Could not cast value of type 'NSConcreteAttributedString' (0x1ec42a250) to 'NSMutableAttributedString' (0x1ec42a2a0).
Until ios12 that code worked without problems. Any idea why this behaviour is changed and how to fix the problem?
Thanks