Is it possible that can count the number of visible characters while truncated?
For example I have a string that has 36 charcters:
"This is a long looong looong string."
And it displays on the UILabel like this:
"This is a long looong..."
My UILabel has no fixed size, because it can be expanded based on the views above it. If I use label.text.count
, it returns the whole 36. I want to get only the visible characters (21 or 24 if ellipsis is included on the count).
Is this possible?