Detect when user opens file in app

你说的曾经没有我的故事 提交于 2020-01-05 01:32:16

问题


I was reading this documentation on how to preview a file on my iOS app.

https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/PreviewingandOpeningItems.html#//apple_ref/doc/uid/TP40010410-SW1

Is there any to detect which app did the user choose? Or any way to kno if he actually tapped on any option?

My problem: iBooks large file (> 700mb). User chooses preview, then taps on the top right corner and chooses to open on iBooks. It takes between 20 to 45 seconds until it jumps to iBooks. If I know that the user tapped any app I could at least show a loading or whatever so he knows something is about to happen.


回答1:


You can use UIDocumentInteractionControllerDelegate methods to achieve this. Here are the list of methods:

Apple document link



来源:https://stackoverflow.com/questions/30298405/detect-when-user-opens-file-in-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!