📜  swift 集合视图单元格大小 - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:02.042000             🧑  作者: Mango

代码示例1
extension YourViewController: UICollectionViewDelegateFlowLayout {
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
        return CGSize(width: screenWidth, height: screenWidth)
    }
}