UICollectionViewReloadDataUpdater

open class UICollectionViewReloadDataUpdater<Adapter> : Updater where Adapter : UICollectionViewAdapter

An updater for managing to perform reload data to render data to the UICollectionView.

  • Create a new updater.

    Declaration

    Swift

    public init()
  • Set the delegate and dataSource of given collection view, then reload data and invalidate layout.

    Declaration

    Swift

    open func prepare(target: UICollectionView, adapter: Adapter)

    Parameters

    target

    A target to be prepared.

    adapter

    An adapter to be set to delegate and dataSource.

  • Perform reload data to render given data to the target.

    Declaration

    Swift

    open func performUpdates(target: UICollectionView, adapter: Adapter, data: [Section])

    Parameters

    target

    A target instance to be updated to render given data.

    adapter

    An adapter holding currently rendered data.

    data

    A collection of sections to be rendered next.