iOS在app中打开word、execl、pdf等文档
2015-12-29 15:50
429 查看
//用UIWebView
-(void)open:(NSString*)wordName andView:(UIWebView*)webView
{
NSString *path = [[NSBundle
mainBundle] pathForResource:wordName
ofType:nil];
NSURL *url = [NSURL
fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest
requestWithURL:url];
[webView
loadRequest:request];
}
[self open:@"test.doc" andView:self.myweabl];
-(void)open:(NSString*)wordName andView:(UIWebView*)webView
{
NSString *path = [[NSBundle
mainBundle] pathForResource:wordName
ofType:nil];
NSURL *url = [NSURL
fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest
requestWithURL:url];
[webView
loadRequest:request];
}
[self open:@"test.doc" andView:self.myweabl];
相关文章推荐
- android 图片点击一下就放大到全屏,再点一下就回到原界面
- Android View之对现有控件进行拓展实例
- iOS_Swift — UI控件代码大全
- app开发过程中内存泄漏一些简述_懂了这些你的app还在闪退么?
- YY Android面经 (未通过)
- RxAndroid和RxJava的资料分享
- Android中MVC的具体体现(简单说明)
- iOS Core Animation 简明系列教程
- ListView下拉刷新(PullToRefresh)
- .net微信授权登录整理
- Android ScrollView嵌套WebView
- Android中ProgressDialog的应用
- Android ListView性能优化实战方案
- Android完美解决输入框EditText隐藏密码打勾显示密码问题
- android常用广播
- ObjectAnimator设置动画
- IOS 9人机界面指南(1)
- IOS开发 CABasicAnimation
- android 沉浸通知栏
- android 创建多层树型结构