Ellipsis (plural ellipses) is a series of dots that usually indicates an intentional omission of a word, sentence, or whole section from a text without altering its original meaning.1
In UILabel ellipsis ‘…’ show up when text is to long to fit in label frame:
Currenlty in UILabel there isn’t an easy way to customize the ellipses and change them to something like in Appstore reviews:
Inspired by an answer on Stackoverflow - a) Store the full text for later expanding b) Trim the full text so it will fit in the required number of lines while considering the custom ellipsis.
- Using attributed text, for really custom ellipses.
- Finds the trimed text length using binary search.
- Does not use deprecated
- Simple to use.
1 2 3 4 5 6
Check it out on Github: DSExpandingLabelWithCustomEllipsis