NSMutableAttributedString not working in tableviewcell with a specific range
I have followed this question but didn't solve my problem. I have a tableview in ViewController , tableviewcell have a label. I want to set attributedString with NSStrikethroughStyleAttributeName . If i am setting complete string as a strikethrough it works but if i am setting as partial it doesn't works. Below code for success result let strOriginalPrice = "my price" let strdiscountedPrice = "discounted price" let strPrice = strOriginalPrice+" "+strdiscountedPrice let attributeString: NSMutableAttributedString = NSMutableAttributedString(string: strPrice) attributeString.addAttribute