I want to create a cell consisting of heading text, description text and a collection view. So I tried to create such a cell 
I added a top, end, and leading to a supervisor restriction for the title and description. Then I also add the top, bottom, end and leading constraint to my UICollectionView .
To automatically height my table cell, I override viewWillAppear
override func viewWillAppear(_ animated: Bool) { tableView.estimatedRowHeight = 300 tableView.rowHeight = UITableViewAutomaticDimension }
And in my custom class, I called layoutIfNeeded()
public func setRowWithData(model: DataModel) {
I want the whole cell in collectionView be shown, and my tableViewCell height will be adapted to it.
Is there any way to do this? Any help would be greatly appreciated. Thank!
ios uitableview uicollectionview
Sonic Master Mar 28 '17 at 5:57 2017-03-28 05:57
source share