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

This commit is contained in:
Maurice Parker committed 2019-11-21 13:49:05 -06:00
1 parent 150e50082c
commit eed6333368
2 files changed
+2 -2

No files matched your search

@@ -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
}
@@ -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 {