Some background : I have a nested tableView in which I can have different types of cell ranging from map to images to key-value pair and more so I had to work with nested tableView which is hard to be achieved by section-row combination
I am using auto-resizing cells.
In my parentTableView
I have set
parentTableView.rowHeight = UITableViewAutomaticDimension
parentTableView.estimatedRowHeight = 200
In my childTableView
, I have set
childTableView.rowHeight = UITableViewAutomaticDimension
childTableView.estimatedRowHeight = 68.0
Here 68.0
is my cell size which is a custom XIB having two UILabel
in vertical sort of orientation. Now when the labels are not multiple line, the tableView is appearing fine . But when i add multiple lines to the labels, the cells are getting clipped
But when I increase the estimatedRowHeight
to say a greater value like 80
, it is not getting clipped but displaying the content AND add some extra white space at the end
What I believe is happening is that it looks at the estimatedRowHeight
value and number of cells that are to be displayed and calculates the parent cell size as per that . And when multiple lined label occurs it increases the size of the cell but the parent cell size has already been defined so it gets clipped
Can anyone please help me out i have tried a lot of fix but nothing is working.