UICollectionView
extension UICollectionView
-
Dequeue cell for the UICollectionView.
Declaration
Swift
func dequeueReusableCell<Cell>(cellType: Cell.Type, for indexPath: IndexPath) -> Cell where Cell : UICollectionViewCellParameters
cellTypeConcreate cell type.
indexPathIndexPath of the cell.
-
Dequeue reusable view for the UICollectionView.
Declaration
Swift
func dequeueReusableSupplementaryView<ReusableView>(reusableViewType: ReusableView.Type, kind: String, for indexPath: IndexPath) -> ReusableView where ReusableView : UICollectionReusableViewParameters
reusableViewTypeConcreate reusable view type.
kindThe kind of reusable view to dequeue.
indexPathIndexPath of the cell.
-
Registers cell’s nibs for the UICollectionView, nib file name must be the same as cell type.
Declaration
Swift
func register<Cell>(cellTypes: [Cell.Type], bunde: Bundle? = nil) where Cell : UICollectionViewCellParameters
cellTypesConcreate cell types.
bundleBundle of nib, by default nil.
-
Registers reusable view’s nibs for the UICollectionView, nib file name must be the same as reusable view type.
Declaration
Swift
func register<ReusableView>(reusableViews: [ReusableView.Type], kind: String, bunde: Bundle? = nil) where ReusableView : UICollectionReusableViewParameters
reusableViewsConcreate reusable view types.
kindThe kind of reusable view to create.
bundleBundle of nib, by default nil.