You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are you sure that the CoreText framework support this attribute?
As OHAttributedLabel is based on CoreText (because it is the only framework, available since iOS 3.2/4.0+, that can draw attributed strings before iOS6 added support for them in UIKit) and not on the newly introduced UIKit methods, if attributes not supported by CoreText itself are used, you won't see their effect.
I'll make some tests anyway with this attribute, but can you tell the code you did try on your own? Thx
After some digging, I confirm that NSStrikethroughStyleAttributeName is only supported on UIKit (and on OSX) but not by CoreText on iOS.
Unfortunately I won't have time soon to write anything to work around this CoreText limitation and add support for this attribute, but feel free to try yourself and propose a pull request.
I saw some interesting code from Cocoanetics (see end of the page) that you can use for inspiration to implement this strikethru yourself, as Apple didn't feel in the mood to support it itself in CoreText…
Strikethrough works in UILabel (using NSStrikethroughStyleAttributeName = NSUnderlineStyleSingle), but doesn't seem to work in OHAttributedLabel.
The text was updated successfully, but these errors were encountered: