Swift 如何在拖放交互期间覆盖UITableViewCell高亮显示?

Swift 如何在拖放交互期间覆盖UITableViewCell高亮显示?,swift,uitableview,drag-and-drop,Swift,Uitableview,Drag And Drop,通过覆盖setHighlighted(uhighlighted:Bool,animated:Bool),我可以覆盖单元格上的默认高亮显示行为,但是,当将一个单元格放入另一个单元格时,这似乎对高亮显示行为没有影响-不调用setHighlighted,并且显示默认的灰色高亮显示,这在我的上下文中看起来不合适。如何覆盖该突出显示行为 相关代码: func tableView(_ tableView: UITableView, dropSessionDidUpdate session: UIDropSe

通过覆盖
setHighlighted(uhighlighted:Bool,animated:Bool)
,我可以覆盖单元格上的默认高亮显示行为,但是,当将一个单元格放入另一个单元格时,这似乎对高亮显示行为没有影响-不调用setHighlighted,并且显示默认的灰色高亮显示,这在我的上下文中看起来不合适。如何覆盖该突出显示行为

相关代码:

func tableView(_ tableView: UITableView, dropSessionDidUpdate session: UIDropSession, withDestinationIndexPath destinationIndexPath: IndexPath?) -> UITableViewDropProposal {
    
    if session.canLoadObjects(ofClass: FolderDragData.self) {
        return UITableViewDropProposal(operation: .move, intent: .insertIntoDestinationIndexPath)
    } else {
        return UITableViewDropProposal(operation: .forbidden)
    }
    
}
文档说,在InsertintoDestinationIndepath的情况下,tableView会突出显示单元格。但是,永远不会调用单元格的
setHighlighted
方法。如何覆盖高亮显示交互的外观