nsattributedstring - How to apply color for underline style in NSAttrbutedString (ios)? -
Assume that I'm adding the style that is outlined in NSAttributedString:
[attrStr addAttribute: NSUnderlineStyleAttributeName Value: @ (NSUnderlineStyleSingle) Category: Category];
Is it possible to apply color (not just the highlighted style) to underline the text color without changing it?
Yes. Use NSUnderlineColorAttributeName
to set the underline color.
Comments
Post a Comment