I receiving the iWork files(Pages,Numbers and keynote), .pdf, .txt and rtf files URL from the server. I try to open the url in web view but not succeed. UIWebview display nothing when i load the url.here is my code
NSURL *url = [NSURL URLWithString:@"url of which i'm reciving from the server"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:request];
Is there any other way to open the following type of files in application? Any help can be appreciated.
The UIWebView is supposed to render websites, not documents (PDF might work).
You should take a look in this Apple Developer Example and an other StackOverflow post (this might be a duplicat):
https://developer.apple.com/library/ios/samplecode/DocInteraction/Introduction/Intro.html Document viewer for ipad