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 implementationCollection view, that will be managed by DTCollectionViewManager. This property or
optionalCollectionView
property must be implemented in order forDTCollectionViewManager
to work.Default Implementation
Declaration
Swift
var collectionView: UICollectionView! { get }
-
optionalCollectionView
Default implementationCollection view, that will be managed by DTCollectionViewManager. This property or
collectionView
property must be implemented in order forDTCollectionViewManager
to work.Default Implementation
Declaration
Swift
var optionalCollectionView: UICollectionView? { get }
-
manager
Extension methodLazily instantiated
DTCollectionViewManager
instance. When your collection view is loaded, call mapping registration methods andDTCollectionViewManager
will take over UICollectionView datasource and delegate. Any method, that is not implemented byDTCollectionViewManager
, 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 }