Search code examples
iosdisplaytttattributedlabel

why TTTAttributedLabel doesn't show last line content after some special symbols on IOS?


This is the correct format on Android:

the correct view style on Android

But the content of last line doesn't show up on iOS:

the wrong way on IOS

I tried method below still not work:

[_contentLab setText:str afterInheritingLabelAttributesAndConfiguringWithBlock:^NSMutableAttributedString *(NSMutableAttributedString *mutableAttributedString) {
            return mutableAttributedString;
}];

Solution

  • Github - TTTAttributedLabel issue

    Use TTTAttributedLabel Version 1.8.1 to avoid truncation issues.

    Or better, I would advice trying https://github.com/Krelborn/KILabel which is a project without this issue.