I've found a solution with GTMFadeTruncatingLabelTest from
CodePudding user response:
I am not sure about the GTMFadeTruncatingLabelTest but I can offer an alternative solution.
Steps
- Check if the label's text is going to be truncated
- If 1 is true, Create a CAGradientLayer that goes from Opaque to Transparent
- Apply the gradient layer as a mask to the UILabel
Implementation
If you don't want to read the rest, just
Limitation
This way only supports single line UILabels