I have a mutable attributed string without NSStrikethroughStyleAttributeName attribute like this:
NSMutableAttributedString *str1 = [[NSMutableAttributedStri
On iOS8.1.1 we have more problems with setting NSMutableAttributedString, like with NSStrikethroughStyleAttributeName.
If your attributes are not changing try this and it will be.
I started reasoning by the UILabel that is spirit to chaneger attributes, so if we assume that the NSStrikethroughStyleAttributeName not initialized the label text so we will need the initialize it .
What I do is initializing mutableAttributedString by a none NSStrikethroughStyleAttributeName and change this attribute to highlight: result is:
NSMutableAttributedString * string = [[NSMutableAttributedString alloc] initWithString: myString attributes: @ {NSStrikethroughStyleAttributeName: @ (NSUnderlineStyleNone)}];
[string addAttributes: @ {NSStrikethroughStyleAttributeName: @ (NSUnderlineStyleSingle)} range: [myString rangeOfString: mySubString]];
[MyLabel setAttributedText: string];
effective result <= iOS8.1.1