I have a vertical UIStackView that has a heading UIlabel where the text is to be on 2 lines and to line break on a specific word. The text is a custom font the client wants. In the image below the line break is after the word "your" and it is supposed to be after the word "phone" instead. I.e. only the word "number" should appear on the second line. I'm tempted to break this into two labels but thought I'd ask here first.
Some questions/ideas:
Did you try putting a linebreak in the string itself? A la
Enter your phone\n number
You must make sure that the width of the label is sufficient.
Don't forget to set the lineBreakMode
of the label to .byWordWrapping
If for some reason the above doesn't work, then I'd recommend using another inner vertical UIStackView
with two labels to enforce this constraint.