In storyBoard i have given top, bottom, leading and trailing constraints to tableview in a view. i have given tableview height as contentSize.height. As per tableview height, no of cells that can visible in tableview 3 or 4 or etc(depending upon content size it may vary). But the problem is table view height is increasing as per content size. if no of cells are more, then it should compare actual height of the table view with content size and if contentSize is lesser than tableview Actual height then only it should change the height of tableview.
if tableViewActualHeight > contentSize {
// then only change tableview height
tableViewActualHeight = contentSize
}
How can we get & where to place that code?