我在 UICollectionViewCell 中有一个 UITableView。我正在将远程 RSS 提要加载到我的表格 View 中。最初,UICollectionViewCell 高度等于 tableview 高度。但是,当加载数据并且 TableView 中的单元格展开时,UICollectionViewCell 不会展开。
注意:我从主线程调用 collectionView.reloadData(),所以这不是问题。
最佳答案
我认为您需要使用此 UICollectionViewDelegateFlowLayout
方法在加载表格后提供新的高度:
- collectionView:layout:sizeForItemAtIndexPath:
关于ios - 当具有动态单元格高度的 UITableview 放置在里面时,如何扩展/缩小 UICollectionViewCell 高度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37263023/