1

I have an application which shows the from and drop location in the UI part. Since i have placed these to UILabels for showing the from and to location in the Stack View. Currently if the from or to location name is bigger it gets truncated at the end and it does not shows the name fully. The example image is shown below: Truncated From and To location

Now i wish to have the From and To location to be fully shown by showing the remaining part in next line . How to achieve this? Currently i am using the following constraints: Constraints in Storyboard

What constraints should i give so that the label expands according to content height wise. And also the stack View should also expand with it. Please see to this and have an idea. I shall be helpful.

Following is the attributes set for the label: Attributes set

When i tried to give the number of lines as 0 it get like this: Overlaps with under contents

Chelsea Shawra
  • 1,593
  • 4
  • 22
  • 43

1 Answers1

0

The number of lines that you have given for the label is 1. So it will get truncated if the content cannot fit in a single line. So if you want the label to grow vertically and show all the contents give number of lines as 0.

Aravind A R
  • 2,674
  • 1
  • 15
  • 25