I have a tableView Cell like this in storyboard as shown in above image.
I defined required things in controller necessary for dynamic cell height like this :
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableViewAutomaticDimension
}
func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
return 250
}
and in viewDidLoad()
self.tblView.rowHeight = UITableViewAutomaticDimension
self.tblView.estimatedRowHeight = 250
But i am getting output like this :
It seems there are some autolayout conflicts here thats why its occurring or might be i am missing something. Actually there are lots of elements in this cell & posting constraints screenshots of all will be bit lengthy. If anyone could tell how to approach for resolving this or if u need constraint images I will add in question.
PS: If anyone is coming here I would recommend read below mentioned answers , it will help you: