草庐IT

insetForSectionsAtIndex

全部标签

swift - 为什么不调用 UICollectionView insetForSectionsAtIndex?

我想使用以下函数,但不幸的是它没有被调用。funccollectionView(collectionView:UICollectionView,layoutcollectionViewLayout:UICollectionViewFlowLayout,insetForSectionAtIndexsection:Int)->UIEdgeInsets{letcellCount=Double(collectionView.numberOfItems(inSection:section))ifletcell=collectionView.cellForItem(at:IndexPath(row