ContextMenu with Drag&Drop in UITableView

I am trying to implement both ContextMenu and Drag&Drop in UITableView like Apple home screen or Photo app, but the contextual menu prevent dragging in iOS.

I didn’t achieve this. apple provide any separate API for this?

Answered by Frameworks Engineer in 790351022

How are you implementing the context menu and drag & drop support? You should be doing two things:

  • Implement the context menu support using the context menu delegate methods on UITableViewDelegate
  • Implement the drag and drop support using UITableViewDragDelegate and UITableViewDropDelegate methods

If you are using both of these, they should play nicely together.

Accepted Answer

How are you implementing the context menu and drag & drop support? You should be doing two things:

  • Implement the context menu support using the context menu delegate methods on UITableViewDelegate
  • Implement the drag and drop support using UITableViewDragDelegate and UITableViewDropDelegate methods

If you are using both of these, they should play nicely together.

ContextMenu with Drag&Drop in UITableView
 
 
Q