The object UIWebView can be used for the display of numerous files. For example you can use it to display - as well as QuickTime movies or YouTube - PDF documents or HTML files into our own code.
1 2 3 4 | [WebView loadRequest: requestWithURL : [ NSURLRequest requestWithURL: fileURLWithPath : [ NSURL fileURLWithPath: mainBundle ] pathForResource : @ "documento" ofType : @ "pdf" ] isDirectory : NO ] ] ] ; [[ NSBundle mainBundle] pathForResource: @ "document" oftype: @ "pdf"] isDirectory: NO]]]; |
Or:
1 2 3 4 | [WebView loadRequest: requestWithURL : [ NSURLRequest requestWithURL: fileURLWithPath : [ NSURL fileURLWithPath: mainBundle ] pathForResource : @ "documento" ofType : @ "html" ] isDirectory : NO ] ] ] ; [[ NSBundle mainBundle] pathForResource: @ "document" oftype: @ "html"] isDirectory: NO]]]; |
In viewing PDF files suggest you add in the settings of the UIWebView :
1 | YES ] ; [WebView setScalesPageToFit: YES]; |










There are no comments for this post
Leave a comment