iOS 11 dropInteraction performDrop for files
问题 How can I use dropInteraction(_ interaction: UIDropInteraction, performDrop session: UIDropSession) to accept other type of files than images? Say for instnce that I drag a PDF or MP3 from the files app. How can I accept this file and get the data? I thought I could use NSURL.self, but that only seems to work for URL's dragged from Safari och a textview. 回答1: An example for PDF ( com.adobe.pdf UTI) implementing NSItemProviderReading could be something like this: class PDFDocument: NSObject,