如何从表视图单元格以及集合视图单元格图像内部创建具有不同单元格大小的此类集合视图,需要从网址单元格下载>
我尝试了下面的代码,但最后2个小单元格出现了,并且从URL集合视图下载的图像在手动触摸集合视图之前没有加载
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let cVWidth = collectionView.frame.width
let biggerCellWidth = (cVWidth / 2.5) - 5
if indexPath.row == 2 || indexPath.row == 3 {
let testValue:CGFloat = 3
return CGSize(width: (biggerCellWidth / 2) - testValue , height: (biggerCellWidth / 2) - testValue )
}
return CGSize(width: biggerCellWidth, height: biggerCellWidth)
}
[如何在表视图单元格内部以及集合视图单元格图像内部创建具有不同单元格大小的这种集合视图,需要从下面的代码尝试从url单元下载,但最后2个...