Open andreaslindahl opened 4 years ago
Investigating this further, it seems most of the attributes, such as bold etc are preserved, but that some already existing paragraph styling is removed, such as headIndent.
Have you tried using:
public func setAttributedText(_ attributedString: NSAttributedString, afterInheritingLabelAttributesAndConfiguringWithBlock block: ((NSMutableAttributedString) -> NSMutableAttributedString)?) ```
Yes, I tried that as well, with the same result.
Same here, it seems centered paragraph is not preserved.
Hi Andreas, I am using NantesLabel library on an iOS app and I have the exact same issue; the following settings are ignored:
paragraphStyle.firstLineHeadIndent paragraphStyle.headIndent paragraphStyle.paragraphSpacingBefore
It would be very important to have this corrected in the Library by the Nantes team.
Is anyone maintaining this library anymore?
@andreaslindahl sorry for the delay. i'm exploring whether we could preserve those attributes. will keep you updated.
@ngocholo check the PR above, this should fix the head ident for attributed strings
When setting the attributedText property to an NSAttributedString, NantesLabel sets the text property of the label to attributedText.string instead of actually setting the attributedText property, which means that any formatting, and other attributes, set on the NSAttributedString aren't used.
Is it possible to use an NSAttributedString without losing all of the formatting and attributes?