I have a TableViewController, which contains three different customized cell. For the first cell, I want to contain a horizontal scrolled CollectionView, the second cell con
you can always have the dynamic height for your tableView on the base of your content, no need to return the static height for just setup the constraints in your cell properly and always use preferred priority for content-hugging content-compressionResistance.
in -viewDidLoad just set
self.tableView.rowHeight = UITableViewAutomaticDimension
self.tableView.estimatedRowHeight = 60; // or whatever is suitable for you
you can also have reference from the Ray Wenderlich's tutorial Self-sizing Table View Cells