UIDocumentInteractionController在设备上崩溃的大图像
问题描述:
我使用UIDocumentInteractionController快速查看iPad(4.3.3)。UIDocumentInteractionController在设备上崩溃的大图像
NSURL *url = [NSURL fileURLWithPath:path];
self.doc = [UIDocumentInteractionController interactionControllerWithURL:url];
self.doc.delegate = self;
[self.doc presentPreviewAnimated:YES];
这适用于所有支持类型和JPG图像高达(〜2000x2000像素)。然后,我试图快速查看jpg图像6000x6000像素,并得到了与消息崩溃:
[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相反,没有崩溃,但没有一个理想的解决方案
答
UIDocumentInteractionController
崩溃经常与中等大小的文件。当你在4.3.3上时,你可以试试QLPreviewController
。
仍然在iPad上崩溃并在模拟器上工作。这里是示例图像http://cl.ly/9BJ4 – vokilam
QLPreviewController可以被称为新的UIDocumentInteractionController(在4.0中引入)。但是,它不是免费的。这是你在iOS上最好的。 – Akshay