You should work with Self-Sizing Table View Cells
.
Set tableview Row height and estimated row height like,
tableView.estimatedRowHeight = 85.0
tableView.rowHeight = UITableViewAutomaticDimension
It must require proper autolayout when set height as UITableViewAutomaticDimension
.
As Apple docs states,
To define the cell’s height, you need an unbroken chain of constraints and views (with defined heights) to fill the area between the content view’s top edge and its bottom edge. If your views have intrinsic content heights, the system uses those values. If not, you must add the appropriate height constraints, either to the views or to the content view itself.
You need to set unbroken chain of constraints that means first object must have top and last must have bottom and if there is only one object in cell then it must have both top and bottom.
You can refer Appcoda's tutorial for more details.
Hope this will help :)