I have a custom UITableViewCell
that only has one Label in it. I also set number of lines in Interface Builder to 0 as I read on StackOverflow.
You need to use self sizing cells.
tableView.estimatedRowHeight = 100
tableView.rowHeight = UITableViewAutomaticDimension
In your storyboard or xib you have to make sure that you set proper constraints in your cells. Do not set a predefined height constraint in your label. Just make sure you give top and bottom constraints. If you are not sure about the text , you can also give a minimum height constraint to the label.