gpt4 book ai didi

ios - 如何获取 QuickLook 预览项目的缩略图?

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:55:19 25 4
gpt4 key购买 nike

我正在使用 QLPreviewController 预览各种文档。 Controller 有一个“ ListView ”选项,它显示 Controller 中所有文档的图像和标题。

Standard QLPreview List View

如何获取该图像以便在不同的屏幕上显示它?

我正在尝试制作一个“查看文件”屏幕,其中显示所有文件详细信息和缩略图预览。然后单击缩略图将使用户看到完整预览。

File Detail Page

最佳答案

在 iOS 中,没有用于获取文件缩略图的 API(如 AppCoda-ImageAppCoda-PDF),但你可以获得一个图标,如 AppCoda-Pages, AppCoda-Word, AppCoda-KeynoteAppCoda-Text.

// Create an `UIDocumentInteractionController` with the file URL.
let controller = UIDocumentInteractionController(url: <#URL#>)

// Get icon
_ = controller.icons[0]

这将返回图标而不是缩略图。

关于ios - 如何获取 QuickLook 预览项目的缩略图?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41104050/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com