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: any UIDragSession) -> BoolParameters
- 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.