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
{{ message }}
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.
LabeLayout relies on boundingRect method which does not work in all cases and I think that it would be great from documentation perspective if have a list of all limitations/constraints found so far.
I've spent few hours finding out why boundingRect does not return valid size and it turned out that it does not work if the NSAttributedString has NSParagraphStyle with line break set to NSLineBreakByTruncatingTail and the number of lines is 0
So here is one issue :)
The text was updated successfully, but these errors were encountered:
@plamenterziev Thanks for your feedbacks. For your NSAttributedString, did you make Text and pass to LabelLayout initializer or update attributed text in config?
@plamenterziev We can definitely mention this issue in the layout's documentation comments. Do you know of a way to come up with an exhaustive list of such issues?
In the longer term, I'm considering implementing a Layout that would render text to a layer at measurement time, avoiding any boundingRect / UILabel disagreements.
LabeLayout relies on
boundingRect
method which does not work in all cases and I think that it would be great from documentation perspective if have a list of all limitations/constraints found so far.I've spent few hours finding out why
boundingRect
does not return valid size and it turned out that it does not work if theNSAttributedString
hasNSParagraphStyle
with line break set toNSLineBreakByTruncatingTail
and the number of lines is 0So here is one issue :)
The text was updated successfully, but these errors were encountered: