skip to Main Content

i want to display some data into a label but it is not showing the full text. How can i fix this behaviour ? I set the lines to 0, but is still not working.

2

Answers


  1. Set horizontal compression resistance to 1000 (Required).

    You can do it in the storyboard or programmatically.

    label.setContentCompressionResistancePriority(.required, for: .horizontal)
    

    Login or Signup to reply.
  2. Don’t set a guaranteed height like equal 50 set a minimum height like >= 50 that ways it will keep on expanding as required.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search