0

I am trying to set the Text to UILabel as following:

self.lbl.text = twoLinesLongStr + "\n" + anyText

The number of lines are set to 0 to achieve resizing and wrapping.

The problem is on adding the \n the word wrapping for the first string is not working properly.

Here: enter image description here enter image description here

In the first image why is the word "This" not on the first line?!

Same thing happen even when using storyboard to set text: enter image description here enter image description here

Reproduced: enter image description here

hasan
  • 23,815
  • 10
  • 63
  • 101

0 Answers0