CellSizeCalculator
open class CellSizeCalculator
An object is responsible for
sizing and configuring cells for given IndexPaths.
-
The layout object for which the cell size calculator is used.
Declaration
Swift
public weak var layout: UICollectionViewFlowLayout? -
Used to configure the layout attributes for a given cell.
- attributes: The attributes of the cell. The default does nothing
Declaration
Swift
open func configure(attributes: UICollectionViewLayoutAttributes) -
Used to size an item at a given
IndexPath.- indexPath: The
IndexPathof the item to be displayed. The default return .zero
Declaration
Swift
open func sizeForItem(at indexPath: IndexPath) -> CGSize - indexPath: The
CellSizeCalculator Class Reference