1

iPad (4.3.3) でのクイック ルックには UIDocumentInteractionController を使用します。

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

これは、サポートされているすべてのタイプと、最大 (~ 2000x2000 px) の 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 はビルド段階にあります。どういう理由ですか?大きな画像サイズ = 426Kb (圧縮された jpeg)。

UPD:iPad2でも同じ話

UPD2: 代わりに UIWebView を使用しようとしましたが、クラッシュはありませんが理想的な解決策はありません

4

1 に答える 1

1

UIDocumentInteractionController中程度のサイズのファイルで頻繁にクラッシュします。4.3.3 を使用しているので、QLPreviewController.

于 2011-08-09T12:57:36.677 に答える