I use NSAttributeString to set strike through on my text, I want it extend on whitespace.
I already set the correct range, but the strike through only cover the text characters. The strike through is ignore the whitespace unless I add some non-empty text before and after it.
How can I make the strike through extend on whitespace without extra text?

I haven't found any solution but with your last option means adding first and last character as
.with space you can try one thing. Either set theNSForegroundColorAttributeNameof that first and last character to your background color of label or set theNSFontAttributeNamewithUIFont.systemFont(ofSize: 0.1). So it will be goes like this. You haven't specify your answer language so i'm posting answer in latest Swift 3.Before using
NSForegroundColorAttributeName&NSFontAttributeNameNow you can use either
NSForegroundColorAttributeNameorNSFontAttributeNameto hide first and lastdot(.)character.After using
NSForegroundColorAttributeNameorNSFontAttributeName