Display multiple documents using UIWebView
In addition to the HTML content,UIWebView can also display several types of documents
Include the following types
· Excel (. xls)
· Keynote (. Key.zip)
· Numbers (. Numbers.zip)
· Pages (. Pages.zip)
· PDF (. pdf)
· Powerpoint (. ppt)
· Word (. doc)
· Rich Text Format (. rtf)
· Rich Text Format Directory (. Rtfd.zip)
· Keynote ' (. Key)
· Numbers ' (. Numbers)
· pages ' (. pages)
The rtfd must be in the format of the document package, and when the zip is compressed, the file suffix name should also be preserved when called Rtfd.zip
Reference when used
-(void) Loaddocument: (nsstring*) DocumentName InView: (uiwebview*) WebView
{
NSString *path = [[NSBundle mainbundle] Pathforresource:documentname Oftype:nil];
Nsurl *url = [Nsurl Fileurlwithpath:path];
nsurlrequest *request = [Nsurlrequest Requestwithurl:url];
[WebView loadrequest:request];
}
Calling-loaddocument:inview:
[Self loaddocument:@ "mydocument.rtfd.zip" InView:self.myWebview];
iOS development uses UIWebView to display multiple documents