sakurashinken sakurashinken - 27 days ago 20
Objective-C Question

Strikethrough thickness for NSMutableAttributedString

I am annotating a mutable attributed string with a strikethrough in objective-c. Using the following code.

[MAString addAttribute:NSStrikethroughStyleAttributeName
value:[NSNumber numberWithInt:1]
range:NSMakeRange(0, [text length])]


I am not clear what the value parameter controls and what its possible values are. Does it control thickness? If so, what are the possible values?

Answer

What about having a look to the documentation?

This value indicates whether the text has a line through it and corresponds to one of the constants described in NSUnderlineStyle. The default value for this attribute is styleNone.

And then:

https://developer.apple.com/reference/uikit/nsunderlinestyle