Issues trying to preview big files with QLPreviewController

前端 未结 1 1105
旧巷少年郎
旧巷少年郎 2021-01-22 06:02

I\'m having issues trying to preview big files in my iPad app. In the app we use UIDocumentInteractionController. When we try to open big files (> 100 MB) the UIDocumentInteract

相关标签:
1条回答
  • 2021-01-22 06:29

    You may not be able to do what you want - it appears that UIDocumentInteractionController can only accept a URL, not an open file.

    Generally, the trick you use is to use a 'mapped' file - this is a file that does not need to be read completely into memory, but using virtual memory is pulled in as needed, then unused chunks freed.

    If you look at this answer you can see how to do this with a NSData object. With such an object you can initialize other types of data objects - just not sure now what to do about UIDocumentInteractionController.

    0 讨论(0)
提交回复
热议问题