Reputation: 4289
I can download documents which can be of types .pdf
,.xlsx
,.jpeg
,.tiff
etc from an API. If I use UIWebView
it doesnot support .xlsx
and .msg
files.
How can I view these files.
Can anyone help me ?
Upvotes: 0
Views: 1774
Reputation: 1001
use this code u will get satisfied
-(void)loadDocument:(NSString*)documentName inView:(UIWebView*)webView
{
NSString *path = [[NSBundle mainBundle] pathForResource:documentName ofType:file type];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
}
try this it will help you to make zimmicks with any type of file
Upvotes: 0
Reputation: 318804
You can use the QLPreviewController
to display all of these types of files.
A Quick Look preview controller can display previews for the following items:
Upvotes: 2