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 even different object like UICollectionViewCell.
-
Collection view, that will be managed by DTCollectionViewManager
Declaration
Swift
var collectionView: UICollectionView? { get }
-
manager
Extension methodLazily instantiated
DTCollectionViewManager
instance. When your collection view is loaded, callstartManaging(withDelegate:)
method 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 }