2012-04-05 4 views
0

iPad上でopenWithDefaultApplicationにダウンロードしたファイル(アプリドキュメントディレクトリに保存)をしようとしています。私はPDFReaderLiteをインストールしましたが、さらにopenWithDefaultApplicationは拡張子を再認識しませんpdfPDFReaderLiteをpdfを開くためのデフォルトアプリにするにはどうすればよいですか?iOsの既定のアプリケーションを開いたファイル

これはopenWithDefaultApplicationはデスクトップ機能であることを示唆している、事前に

答えて

1

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filesystem/File.html#openWithDefaultApplication%28%29、ありがとうございました。私は、デフォルトのアプリケーション機能がiOS上に存在するとは思わない。

+0

はい、私はそれを読むだろう。この機能がモバイルデバイス上で何もしないことは何も知られていません。開いているファイルを別の方法で開く方法に関するアイデアですか? – Eugeny89

+0

iOSでこれを行う方法は1つだけです。アプリケーションが開くように設計されたカスタムURLを使用してアプリケーションを呼び出す必要があります。ただし、この機能を既存のアプリに追加することはできません。それは著者によって追加されなければならない。このリンクには詳細情報があります:http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html – borrrden

0
UIButton *button = (UIButton *)sender; 
    NSURL *URL = [[NSBundle mainBundle] URLForResource:@"file_1" withExtension:@"pdf"]; 


    if (URL) { 
     // Initialize Document Interaction Controller 
     self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:URL]; 

     // Configure Document Interaction Controller 
     [self.documentInteractionController setDelegate:self]; 

     // Present Open In Menu 
     BOOL flag =[self.documentInteractionController presentOpenInMenuFromRect:[button frame] inView:self.view animated:YES]; 

     if (!flag) { 

      //[appDel showAlert:@"There is no supported app installed in your phone"]; 
      [self.documentInteractionController presentPreviewAnimated:YES]; 
     }