Contents

collectionView(_:dragSessionAllowsMoveOperation:)

Returns a Boolean value that determines whether a move operation is allowed for a drag session.

Declaration

optional func collectionView(_ collectionView: UICollectionView, dragSessionAllowsMoveOperation session: any UIDragSession) -> Bool

Parameters

  • collectionView:

    The collection view from which the drag operation originated.

  • session:

    The drag session that’s active.

Return Value

false to cancel the drag session if move is not allowed; otherwise, true.

Discussion

If you don’t implement this method, the default return value is true.

See Also

Controlling the drag session