How to disable iOS 11 dragging within the whole app?

前端 未结 3 1167
名媛妹妹
名媛妹妹 2021-01-03 07:22

For security reasons I want to disable the new iOS 11 drag & drop feature within my whole app. More specifically the drag part.

In iOS 11 it\'s happening by defa

3条回答
  •  南方客
    南方客 (楼主)
    2021-01-03 07:32

    I'm not aware of any way to fully disable the dragging functionality, but there's a way to confine the drag session to your own app only. That should already be a big improvement in terms of security.

    Take a look at sessionIsRestrictedToDraggingApplication.

    dragInteraction(_:sessionIsRestrictedToDraggingApplication:)

    Called to ask your app whether the drag session should be confined to the app in which it begins.

提交回复
热议问题