How to open Acrobat Reader to read pdf file?

前端 未结 2 1457
日久生厌
日久生厌 2020-12-21 21:03

I have many files in .pdf format. I\'m display the names of the files in a collection view. Now in the didSelectItemAtIndex method, I want to open Acrobat Reader to open the

2条回答
  •  感动是毒
    2020-12-21 21:40

    First get the path for your pdf file. They call this to open pdf through acrobat reader

    UIApplication.shared.open(URL(string: "com.adobe.adobe-reader://PDFFilePath")!)
    

    But before that, there is no harm to confirm if the reader is already installed or not

    if UIApplication.shared.canOpenURL(theURL! as URL) {
    
    }
    

提交回复
热议问题