UITableView and UICollectionView should provide an approved method for removing system interactions

Originator:curtis.clifton
Number:rdar://32854527 Date Originated:19-Jun-2017 11:50 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.0 (15A5278f)
Classification:Serious Bug Reproducible:Always
 
Summary:
Because UITableViewDropDelegate does not allow moving multiple items within the same table view (see rdar:///32854195), we need to remove the system’s UIDragInteraction from a UITableView and install our own. Currently we just iteration all the interactions installed on the table view and remove any UIDragInteractions. We do this at viewDidLoad time before installing our own drag interaction.

Steps to Reproduce:
1. Compile and run the attached project on an 12.9” iPad 
2. Note that it is possible to drag multiple items in the sidebar to rearrange.
3. Look in ViewController.swift for the viewDidLoad() method.

Expected Results:
This method would be able to request that the table view remove its own drop interaction.

Actual Results:
We just iteration all the interactions installed on the table view and remove any UIDragInteractions.

Version:
11.0 (15A5278f)

Notes:
Our workaround seems fine for now, but if the system ever installs multiple drop interactions that will be a breaking change. It seems like we’re relying too much on implementation details with our workaround.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!