Restrict drag and drop to the same process (for now)

This commit is contained in:
Maurice Parker 2019-11-21 13:49:05 -06:00
parent 150e50082c
commit eed6333368
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ extension MasterFeedViewController: UITableViewDragDelegate {
let data = webFeed.url.data(using: .utf8)
let itemProvider = NSItemProvider()
itemProvider.registerDataRepresentation(forTypeIdentifier: kUTTypeURL as String, visibility: .all) { completion in
itemProvider.registerDataRepresentation(forTypeIdentifier: kUTTypeURL as String, visibility: .ownProcess) { completion in
completion(data, nil)
return nil
}

View File

@ -14,7 +14,7 @@ import RSTree
extension MasterFeedViewController: UITableViewDropDelegate {
func tableView(_ tableView: UITableView, canHandle session: UIDropSession) -> Bool {
return session.localDragSession != nil //&& session.canLoadObjects(ofClass: URL.self)
return session.localDragSession != nil
}
func tableView(_ tableView: UITableView, dropSessionDidUpdate session: UIDropSession, withDestinationIndexPath destinationIndexPath: IndexPath?) -> UITableViewDropProposal {