DTCollectionViewDropPlaceholderContext
Thin wrapper around UICollectionViewDropPlaceholderContext
, which automates insertion of dragItems
if you are using MemoryStorage
.
Typically, you would not create this class directly, but use DTCollectionViewManager.drop(_:to:with:)
convenience method.
-
Drop context
-
Creates
DTCollectionViewDropPlaceholderContext
withcontext
andstorage
-
Commits insertion of item, using
UICollectionViewDropPlaceholderContext.commitInsertion(_:)
method. Both commit andinsertionIndexPathClosure
will be automatically dispatched toDispatchQueue.main
. If you are usingMemoryStorage
, model will be automatically inserted, and no additional actions are required. -
Convenience method to call
context.deletePlaceholder
.