CellParentViewProtocol
public protocol CellParentViewProtocol
This protocol unifies UICollectionView and UITableView by providing a common dequeue method for cells.
It describes a view that is the “parent” view for a cell.
For UICollectionViewCell, this would be UICollectionView.
For UITableViewCell, this would be UITableView.
-
The type of cell for this parent view.
Declaration
Swift
associatedtype CellType : UIView
-
Returns a reusable cell located by its identifier.
Declaration
Swift
func dequeueReusableCellFor(identifier: String, indexPath: IndexPath) -> CellTypeParameters
identifierThe reuse identifier for the specified cell.
indexPathThe index path specifying the location of the cell.
Return Value
A valid
CellTypereusable cell. -
Returns a reusable supplementary view located by its identifier and kind.
Declaration
Swift
func dequeueReusableSupplementaryViewFor(kind: String, identifier: String, indexPath: IndexPath) -> CellType?Parameters
kindThe kind of supplementary view to retrieve.
identifierThe reuse identifier for the specified view.
indexPathThe index path specifying the location of the supplementary view in the collection view.
Return Value
A valid
CellTypereusable view.
View on GitHub
CellParentViewProtocol Protocol Reference