【问题标题】:UIDocumentInteractionController crashes on device for large imagesUIDocumentInteractionController 在设备上因大图像而崩溃
【发布时间】:2011-08-09 12:25:30
【问题描述】:

我使用 UIDocumentInteractionController 在 iPad (4.3.3) 上快速查看。

NSURL *url = [NSURL fileURLWithPath:path];
self.doc = [UIDocumentInteractionController interactionControllerWithURL:url];
self.doc.delegate = self;
[self.doc presentPreviewAnimated:YES];

这适用于所有支持的类型和最大 (~ 2000x2000 像素) 的 jpg 图像。然后我尝试快速查看 6000x6000 像素的 jpg 图像,并收到一条消息:

[Switching to process 11779 thread 0x0]
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3.3 (8J3)/Symbols/System/Library/Frameworks/QuickLook.framework/DisplayBundles/Image.qldisplay/Image (file not found).
warning: No copy of Image.qldisplay/Image found locally, reading from memory on remote device.  This may slow down the debug session.

模拟器上的大图像可以正常工作。 Quicklook.framework 处于构建阶段。什么原因? 大图像大小 = 426Kb(压缩的 jpeg)。

UPD:iPad2 上的相同故事

UPD2:我尝试改用 UIWebView,没有崩溃但没有理想的解决方案

【问题讨论】:

    标签: iphone ipad quicklook


    【解决方案1】:

    UIDocumentInteractionController 在文件大小适中时经常崩溃。正如您在 4.3.3 上一样,您可以尝试QLPreviewController

    【讨论】:

    • 仍然在 iPad 上崩溃并且在模拟器上工作。这是示例图片cl.ly/9BJ4
    • QLPreviewController 可以称为新的 UIDocumentInteractionController(在 4.0 中引入)。但是,它不是无崩溃的。这是您在 iOS 上获得的最佳体验。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-05
    相关资源
    最近更新 更多