Example to resize UITableViewCell that contains a UICollectionView

Auto Resize TableViewCell that contains UICollectionView

The idea of the POC is validate if is possible to do not define a cell hight and leave that the autoSizing do it this using UITableView.automaticDimension

override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
    return UITableView.automaticDimension
}
Actual Expected

File:

TableViewController: Contains the UITableView, implements DataSource methods

CollectionViewCellTableViewCell: This is a UITableViewCell that contains the UICollectionView it is register the UICollectionViewCell and implements the UICollectionViewDataSource

CollectionViewCell: The cell that is used by the UICollectionView

GitHub

View Github