IOS/Swift: Open PDF from a local path into a Web View -


i used below code open dummy pdf, testing purpose, , actual project have load pdf based on table cell clicked give exact path of pdf @ local path.

self.termspath = nsbundle.mainbundle().pathforresource("demoform", oftype: "pdf")!     let url = nsurl(fileurlwithpath: termspath!)     let pdfrequest = nsurlrequest(url: url!)     pdfwebview.loadrequest(pdfrequest)     pdfwebview.scalespagetofit = true 

now have thisvariable docpath passed prepareforsegue when table cell clicked, tried use variable in place of demoform gives below error

thread 1: exc_bad_instruction (code=exc_1386_invop, subcode=0x0 

where i'm going wrong here? can me.thanks

edit: way docpath refers ".../.../.../.../referral.pdf"


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -