UICollectionView
-
Registers
type.Nib
fortype.Identifier
Declaration
Swift
public func registerNib<T: UICollectionViewCell>(of type: T.Type)
Parameters
type
UICollectionViewCell
subclass to register -
Registers
type
fortype.Identifier
Declaration
Swift
public func registerClass<T: UICollectionViewCell>(of type: T.Type)
Parameters
type
UICollectionViewCell
subclass to register -
Dequeues a cell of type
T
for reuseIdentifierT.Identifier
Declaration
Swift
public func dequeueCell<T: UICollectionViewCell>(for indexPath: IndexPath) -> T
Parameters
indexPath
indexPath of cell
Return Value
Your registered
UICollectionViewCell
subclass
-
Registers
type.Nib
fortype.Identifier
Declaration
Swift
public func registerNib<T: UICollectionReusableView>(of type: T.Type, forSupplementaryViewOfKind kind: SupplementaryViewKind)
Parameters
type
UICollectionReusableView
subclass to register -
Registers
type
fortype.Identifier
Declaration
Swift
public func registerClass<T: UICollectionReusableView>(of type: T.Type, forSupplementaryViewOfKind kind: SupplementaryViewKind)
Parameters
type
UICollectionReusableView
subclass to register -
Dequeues a reusableView of type
T
for reuseIdentifierT.Identifier
Declaration
Swift
public func dequeueSupplementaryView<T: UICollectionReusableView>(of kind: SupplementaryViewKind, for indexPath: IndexPath) -> T
Parameters
indexPath
indexPath of reusableView
Return Value
Your registered
UICollectionReusableView
subclass
-
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.