2016-05-26 10 views
0

pdfファイルをプレビューできません。uitableviewをpdfに出力する

dispatch_async(dispatch_get_main_queue(), {() -> Void in 
      let pdfURL = NSURL(fileURLWithPath: NSHomeDirectory().stringByAppendingString("/sample1.pdf")) 
      let interactionController = UIDocumentInteractionController(URL: pdfURL) 
      interactionController.delegate = self 
      interactionController.presentPreviewAnimated(true) 
     }) 

これはpdfを開きますが、プレビューは利用できず、Simulatorでの動作は完璧です。

enter image description here

答えて

0

ファイルをオンラインで保存し、あなたが何ができるか、ファイルへのURLを持っている場合は、このリンク

http://docs.google.com/gview?embedded=true&url=URL_TO_THE_FILE

と使用ファイルの使用を表示するには、Googleドキュメントを使用していますWebViewを表示します。

回答が役に立ちますようお願いいたします。

関連する問題