我有一个里面有4个UITableViewCell的UITableView。我希望它是动态的,通过设置:
tableView.estimatedRowHeight = 44
tableView.rowHeight = UITableViewAutomaticDimension
对于第三个单元格,使用embed UICollectionView,它有20 UICollectionViewCell。
当我运行我的项目时,uicollectionviewcell返回(44,44),并显示以下错误:
The behavior of the UICollectionViewFlowLayout is no
我正在创建一个建议/标签视图。这基本上是一个水平的uicollectionview。我有一个自定义单元格,其中只有一个标签,没有自动调整大小或自动约束。我有一个数组var tagsArray = ["Label", "A Long Label", "A very long label"],我在collectionView委托方法中使用它:
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
我用UICollectionView和UICollectionViewFlowLayout创建了一个UICollectionViewScrollDirectionHorizontal。我需要把视野的框架设置在固定的高度。
然而,一些单元格的高度可能大于视图的高度。当这个单元格显示时,控制台会抱怨:
the behavior of the UICollectionViewFlowLayout is not defined because: the item height must be less than the height of the UICollectionView minus the