UIDocumentInteractionController crashes on device for large images
I use UIDocumentInteractionController for quick look on iPad (4.3.3).
NSURL *url = [NSURL fileURLWithPath:path];
self.doc = [UIDocumentInteractionController interactionControllerWit开发者_运维问答hURL:url];
self.doc.delegate = self;
[self.doc presentPreviewAnimated:YES];
This works fine for all supported types and for jpg images up to (~ 2000x2000 px). Then I tried to quick view jpg image 6000x6000 px and got a crash with message:
[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.
Large images on emulator work fine. Quicklook.framework is in Build Phase. What's the reason? Large Image size = 426Kb (compressed jpeg).
UPD: same story on iPad2
UPD2: I tried to use UIWebView instead, no crashes but no an ideal solution
UIDocumentInteractionController
crashes frequently with files of moderate size. As you are on 4.3.3, you could try the QLPreviewController
.
精彩评论