optonaut / ActiveLabel.swift

UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift
MIT License
4.47k stars 686 forks source link

lineSpacing be cleaned When use attributedText #296

Closed CivelXu closed 4 years ago

CivelXu commented 5 years ago

Hello, I encounter one issues, lineSpacing be cleaned When I set attributedText in ActiveLabel;

JulianSong commented 5 years ago

I got that same issue. I created an ActiveLabel in a table view cell and set it's attributedText with lineSpacing attributed. But the lineSpacing doesn't work. And all the other labels on this page which set with attributedText ,their lineSpacing attributeds have ignored.

linW23 commented 5 years ago

u can use label.lineSpacing = xxx

NikKovIos commented 5 years ago

ActiveLabel works bad with attributed string. It set own lineSpacing in fileprivate func addParagraphStyle(_ attrString: NSAttributedString) -> NSMutableAttributedString

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

gerchicov-bp commented 3 years ago

WTF? It is not solved but is closed

gerchicov-bp commented 3 years ago

@CivelXu if it will help you - this control ignores some attributed string params by adding its own replacement properties. You can call "label.lineSpacing = ...". Moreover this control not only ignores attributed string params - it tries to rewrite them. In other words I tried to create a variable with attributes string params and reuse but it became broken not only in ActiveLabel but in UILabel too.

NikKovIos commented 3 years ago

@gerchicov-bp open a new issue with mark to that issue