iPad(4.3.3)のクイックルックにUIDocumentInteractionControllerを使用します。大きな画像の場合、UIDocumentInteractionControllerがデバイスでクラッシュする
NSURL *url = [NSURL fileURLWithPath:path];
self.doc = [UIDocumentInteractionController interactionControllerWithURL:url];
self.doc.delegate = self;
[self.doc presentPreviewAnimated:YES];
これは、サポートされているすべてのタイプと、最大2000x2000ピクセルまでのjpgイメージで問題なく動作します。それから私は、クイックビューのjpg画像6000x6000 PXにしようとしたメッセージでクラッシュました:エミュレータ作業罰金に
[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はBuild Phaseにあります。どういう理由ですか? 大きい画像サイズ= 426Kb(圧縮されたJPEG)。
UPD:iPad2の
UPD2で同じ話:私は、適度なサイズのファイルで頻繁に、代わりのUIWebViewを使用するには、noクラッシュしたが、無理想的なソリューション
はまだiPadでクラッシュし、シミュレータで動作します。ここにサンプル画像があります。http://cl.ly/9BJ4 – vokilam
QLPreviewControllerは、新しいUIDocumentInteractionController(4.0で導入されました)と呼ばれることができます。ただし、クラッシュフリーではありません。それはあなたがiOSで得る最高です。 – Akshay