I am making an example that shows me the tweets that there are according to the user who writes.
The problem is that putting the Nombre de usuario
and followed by the nombre la cuenta
truncates the beginning of the nombre de usuario
, instead of truncating the nombre de la cuenta
. I explain it better with examples:
And this is how I want it to be:
EDITED
The first one label
, the font is System Bold 18.0
, set to one line
The second label
, the font is System 13.0
, set to a line
I have made the images with paint
, so the sizes and fonts may not correspond to reality
As I was telling you, I think the best option is to calculate what each uilabel will occupy and from there you change the frame and manually truncate the piece of text you want. You get the size it occupies with that: (it is in objC)
And if you know how much room you have left, then you do a little math. To change a frame, what you have to do is remove it, change it and assign it:
the values of x, y, width and height you have to calculate depending on the size that remains on the screen