DTCollectionViewManageable

public protocol DTCollectionViewManageable : AnyObject

Adopting this protocol will automatically inject manager property to your object, that lazily instantiates DTCollectionViewManager object. Target is not required to be UICollectionViewController, and can be a regular UIViewController with UICollectionView, or any other view, that contains UICollectionView.

  • collectionView Default implementation

    Collection view, that will be managed by DTCollectionViewManager. This property or optionalCollectionView property must be implemented in order for DTCollectionViewManager to work.

    Default Implementation

    Declaration

    Swift

    var collectionView: UICollectionView! { get }
  • optionalCollectionView Default implementation

    Collection view, that will be managed by DTCollectionViewManager. This property or collectionView property must be implemented in order for DTCollectionViewManager to work.

    Default Implementation

    Declaration

    Swift

    var optionalCollectionView: UICollectionView? { get }
  • manager Extension method

    Lazily instantiated DTCollectionViewManager instance. When your collection view is loaded, call mapping registration methods and DTCollectionViewManager will take over UICollectionView datasource and delegate. Any method, that is not implemented by DTCollectionViewManager, will be forwarded to delegate. If this property is accessed when UICollectionView is loaded, and DTCollectionViewManager is not configured yet, startManaging(withDelegate:_) method will automatically be called once to initialize DTCollectionViewManager.

    See also

    startManaging(withDelegate:)

    Declaration

    Swift

    public var manager: DTCollectionViewManager { get set }