如何打开&使用Document目录中的UIWebview查看iphone中的.doc,.docx,.rtf,.ppt,.pptx,.xlsx,.xls文件? [英] How to open & view view .doc, .docx, .rtf, .ppt, .pptx, .xlsx, .xls file in iphone using UIWebview in Document directory?

查看:105
本文介绍了如何打开&使用Document目录中的UIWebview查看iphone中的.doc,.docx,.rtf,.ppt,.pptx,.xlsx,.xls文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以打开&使用UIWebview查看iphone中的.doc,.docx,.rtf,.ppt,.pptx,.xls,.xlsx文件?

Can we open & view .doc, .docx, .rtf, .ppt, .pptx, .xls, .xlsx file in iphone using UIWebview?

我正在使用Document目录来显示文件。

I am using Document directory to show the file.

.doc文件在这里工作正常...但其余文件的扩展名无效..

.doc file is working fine here… but rest of the files' extensions are not working..

如果有人实现了这个,请帮助我...

if any one has implemented this then please help me...

任何代码段或任何网络链接帮助...

any code snippet or any web link help...

提前感谢...

推荐答案

试试这个:

     [self.m_webView loadRequest:[NSMutableURLRequest requestWithURL:[NSURL fileURLWithPath:_m_filePath]cachePolicy:NSURLCacheStorageAllowedInMemoryOnly timeoutInterval:3.0]];  

您可以更改timeoutInterval和cachePolicy,有时您需要等待更多时间才能加载。

You can change timeoutInterval and cachePolicy, in sometime you have to wait more time to loading.

这篇关于如何打开&使用Document目录中的UIWebview查看iphone中的.doc,.docx,.rtf,.ppt,.pptx,.xlsx,.xls文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆