CollectionView

public class CollectionView : UICollectionView
extension CollectionView: UICollectionViewDataSource
extension CollectionView: UICollectionViewDelegate
extension CollectionView: UICollectionViewDelegateFlowLayout

Undocumented

Auxiliary modifiers

  • Set a new delegate for CollectionView. All modifiers depending on delegate will do nothing after calling that.

    Declaration

    Swift

    @discardableResult
    func set(delegateTo delegate: UICollectionViewDelegate) -> Self
  • Set a new delegate for CollectionView. All modifiers depending on data source will do nothing after calling that.

    Declaration

    Swift

    @discardableResult
    func set(dataSourceTo dataSource: UICollectionViewDataSource) -> Self

Update data and layout

Prefetching

Creating Collection Cells

Items management

Section Management

Appearance customization

Data Source modifiers

  • Declaration

    Swift

    @discardableResult
    func setNumberOfItemsInSection(handler: @escaping ((UICollectionView, Int) -> Int)) -> Self

    Parameters

    handler

    Contains actually declared collection view and given section, expects to return number of items for given section.

  • Undocumented

    Declaration

    Swift

    @discardableResult
    func configureCell(handler: @escaping ((UICollectionView, IndexPath) -> UICollectionViewCell)) -> Self
  • Set index titles for CollectionView

    Declaration

    Swift

    @discardableResult
    func setSectionTitles(shouldReloadData: Bool = false, to array: [String]) -> Self

    Parameters

    array

    Used to provide titles for Collection View, order used is the same as the order of parameter.

Auxiliary Data Source

Delegation modifiers

Auxiliary Delegation

Layout modifiers

Collection Flow Layout Delegate