Issues trying to preview big files with QLPreviewController

廉价感情. 提交于 2019-12-02 02:27:52
David H

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.

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