NSStrikethroughStyleAttributeName not working on device iOS 10.3 beta

NSStrikethroughStyleAttributeName is not working on device on iOS 10.3, but it works on simulator...

any thoughts ?

Replies

I am seeing the same behaviour as you've described on iOS 10.3 beta and tvOS 10.2 beta that NSStrikethroughStyleAttributeName doesn't work on the devices, but works just fine in the simulator. That said I couldn't reproduce this behaviour in a very simple demo project.

So simple attributed strings with one styling for the whole string work, but adding a strike through to a part of a string only doesn't get rendered. I could reproduce this in a small demo project and filled a radar (30671850).

Can't work on iOS10.3 simulator either.Now we are considring to draw a line.

It seems that you should set the attribute of the part that you don't want render to @(NSUnderlineStyleNone) at the same time.Things hanppend on iOS8.3.Hope it can help.

10.3 beta 5 is affected too. NSStrikethroughStyleAttributeName is not working anymore.

If this can help, after some tests on a playground with Xcode version 8.3 beta 4 (8W143q), it seems not to work only if a string is partially marked with a strikethrough attribute

i just found that Chinese characters strings does not even work in the simulator....i did submit a bug in apple bug reporter...no replies..

Workaround for specific scenarios can be found here:

http://stackoverflow.com/questions/43074652/ios-10-3-nsstrikethroughstyleattributename-is-not-rendered-if-applied-to-a-sub

Not fixed in official version. This realy *****!

Apple please fix this ASAP!

try addAttribute: NSBaselineOffsetAttributeName

it works & thx a lot

Its really a big problem.

The upgrade ios10.3.1, this problem is still not processing, apple is not going to fix the bug

It works for me. Thank you very much!

Can you show me how did you fix it with NSBaselineOffsetAttributeName?


thx