CellConfiguratorProtocol
@available(iOS 9.0, *)
public protocol CellConfiguratorProtocol
A cell configurator can be used to configure the collection view cells for a certain MenuItem
-
Called to get the size of the cell for the given item.
Declaration
Swift
func size(for item: Item) -> CGSize
Parameters
item
The item based on which the size of the cell should be calculated.
Return Value
The size of the cell.
-
Registers the cell of the current cell configurator.
Declaration
Swift
func registerCell(in collectionView: UICollectionView)
Parameters
collectionView
The collection view to register the cell in.
-
Called to configure the cell for the given item.
Declaration
Swift
func configureCell(_ cell: Cell, for item: Item) -> Cell
Parameters
cell
The cell that must be configured.
item
The item that the cell must be configured for.
Return Value
The configured cell.