I have got TableView
in the MainstoryBoard
and the number of rows is random every time.
I want the height of the whole TableView
to be fl
Take outlet of the Height Constraint of the parent view and assign it the height of table view's content + constant(extra height of other contents in the view)
heightConstraintView.constant = tableView.contentSize.height + constantValue //use the value of constant as required.
and write this code in the cellForRowAt method.