UICollectionView
-
Registers
type.Nibfortype.IdentifierDeclaration
Swift
public func registerNib<T: UICollectionViewCell>(of type: T.Type)Parameters
typeUICollectionViewCellsubclass to register -
Registers
typefortype.IdentifierDeclaration
Swift
public func registerClass<T: UICollectionViewCell>(of type: T.Type)Parameters
typeUICollectionViewCellsubclass to register -
Dequeues a cell of type
Tfor reuseIdentifierT.IdentifierDeclaration
Swift
public func dequeueCell<T: UICollectionViewCell>(for indexPath: IndexPath) -> TParameters
indexPathindexPath of cell
Return Value
Your registered
UICollectionViewCellsubclass
-
Registers
type.Nibfortype.IdentifierDeclaration
Swift
public func registerNib<T: UICollectionReusableView>(of type: T.Type, forSupplementaryViewOfKind kind: SupplementaryViewKind)Parameters
typeUICollectionReusableViewsubclass to register -
Registers
typefortype.IdentifierDeclaration
Swift
public func registerClass<T: UICollectionReusableView>(of type: T.Type, forSupplementaryViewOfKind kind: SupplementaryViewKind)Parameters
typeUICollectionReusableViewsubclass to register -
Dequeues a reusableView of type
Tfor reuseIdentifierT.IdentifierDeclaration
Swift
public func dequeueSupplementaryView<T: UICollectionReusableView>(of kind: SupplementaryViewKind, for indexPath: IndexPath) -> TParameters
indexPathindexPath of reusableView
Return Value
Your registered
UICollectionReusableViewsubclass
-
Returns the indexPath of the one visible collection view cell. Designed for use in
scrollViewDidEndDecelerating.Will NOT be useful unless your itemSize == collectionView.size.
Declaration
Swift
public func indexPathForVisibleFullSizeCell() -> IndexPath?Return Value
IndexPath of the cell that is visible and centred.
UICollectionView Extension Reference