1

Can you please let me know what is the best way to display a long text in the app? I would like to display text about the company. Now I do have tableView and inside of the cell just a normal UILabel. Is it ok? Thanks!

Juri
  • 93
  • 8

1 Answers1

2

Yes, its ok to display long text in the UILabel. In Label you can also use attributed string in case you need anytime. You need to make sure dynamic height of the table row with the UILabel content. Use 0 as number of lines for the UILabel and TextWrap as the Line break option. Make sure you have good constraints for your label in the cell row. enter image description here

Ash
  • 5,525
  • 1
  • 40
  • 34
  • Is it possible to add text line height programmatically to UILabel? – Juri Jan 24 '18 at 19:52
  • Yes, You can put Height constraint with equalTo..... on the label's height,.. but watch it carefully in different devices and make sure it won't truncate your text for bigger text... – Ash Jan 24 '18 at 22:22