Instance Method

dragInteraction(_:sessionIsRestrictedToDraggingApplication:)

Asks the delegate whether the system should restrict the drag session to the app that started the session.

Declaration

optional func dragInteraction(_ interaction: UIDragInteraction, sessionIsRestrictedToDraggingApplication session: UIDragSession) -> Bool

Parameters

interaction

The interaction that called this method.

session

The drag session to restrict or not restrict.

Return Value

true if you want to restrict the drag session to the app that started it; otherwise false, which is the default if you don't provide this method.

Discussion

If you return true and the user attempts to drop the drag items onto another app, the system cancels the session.

See Also

Restricting the Drag Behavior

func dragInteraction(UIDragInteraction, sessionAllowsMoveOperation: UIDragSession) -> Bool

Asks the delegate whether the session allows the move operation.