I am trying to set a multiline UILabel
, inside an UITableCell
.
That UILabel
has a proportional width
taking as reference the screen of the device (with a multiplier). The text inside of it can change so I need to fit on the UILabel
being able to multiline when the width of the text is higher than the space of the UILabel
width.
I tried using:
myLabel.lineBreakMode = .byWordWrapping
myLabel.numberOfLines = 0
myLabel.sizeToFit()
but it is always displayed on one line truncating the text that overflows the UILabel
width.
How can I make my UILabel to be multiline?
EDIT: I cannot put breaklines to my text because I retrieve my texts from my database.
Thanks in advance!