in iOS 15.0 Devices when implementing UItableView Drag/Drop using delegate, I am facing an issue.
UITableViewDropDelegate Methods are not called.
func tableView(_ tableView: UITableView, dropSessionDidEnter session: UIDropSession) {
//This is called
}
func tableView(_ tableView: UITableView, canHandle session: UIDropSession) -> Bool {
//This gets called
return true
}
func tableView(
_ tableView: UITableView,
dropSessionDidUpdate session: UIDropSession,
withDestinationIndexPath destinationIndexPath: IndexPath?
) -> UITableViewDropProposal {
//Does not gets called
}
/**
This delegate method is the only opportunity for accessing and loading
the data representations offered in the drag item. The drop coordinator
supports accessing the dropped items, updating the table view, and specifying
optional animations.
*/
func tableView(_ tableView: UITableView, performDropWith coordinator: UITableViewDropCoordinator) {
//Does not gets called
}
The issue only occurs in iOS 15.0 devices. OS version>15.0 it works fine.
Delegate method registered using
tableView.dragInteractionEnabled = true
tableView.dragDelegate = self
tableView.dropDelegate = self
Is there any solution to this?