UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 55, 320, 300)];
webView.delegate = self;
webView.multipleTouchEnabled = YES;
webView.scalesPageToFit = YES;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *docPath = [documentsDirectory stringByAppendingString:@"/doc2003_1.doc"]; NSLog(@"#######%@",docPath);
NSURL *url = [NSURL fileURLWithPath:docPath];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];
[self.view addSubview:webView];
[webView release];
分享到:
相关推荐
iOS UIWebView URL拦截.pdf
断点多文件续载+UIwebView打开pdf,doc,excel 改一下下载的pdf就行了+本地照片库保存
(OC)(UIWebView)新闻详情
因此,实现用户触击UIWebView页面中的链接,并跳至Safari中打开链接页面的步骤如下: 定义实现UIWebViewDelegate协议的类MyWebViewDelegate(通常是由包含UIWebView的controller中实现UIWebViewDelegate协议)。 ...
UIWebView使用[归纳].pdf
IOS开发中因为引入cocos2dx,导致代码审核不通过无法提交( Apple will stop accepting submissions of apps that use UIWebView APIs...具体的修改方式使用以下的文件替换cocoas引擎中的UIWebViewImpl-ios.mm文件即可。
UIWebView+html+css,实现UIWebView中可点击链接,并且可显示gif动画效果
UIWebView和js交互 里边自己写了个H5方便大家理解
iOS使用UIWebView打开PDF等文档的实例
UIWebView Web 网页 Demo 代码
使用UIWebView和JS进行交互,可以OC操作js,也可以JS对OC进行交互
UIWebView可以用来加载pdf word doc 等等文件 生成webview 有两种方法: 1、通过storyboard 拖拽 2、通过alloc init 来初始化 创建webview,下列文本中 _webView.dataDetectorTypes = UIDataDetectorTypeAll; 是识别...
这是我在学习ios的过程中写的一个demo,使用UIWebView实现一个简单的浏览器
网页视图的基本使用,网络资源地址字符串的处理,UIWebView属性与协议的综合使用;
UIWebView原生与H5交互,pre;confirm;等包含三个H5页面跳转的交互demo
UIWebVeiw的使用,功能包括“返回上页”“在safari打开”“网页刷新”
UIWebView实现图文混排
这是iPhone开发之UIWebView示例程序,具体参考: http://blog.csdn.net/htttw/article/details/7888557
UIWebView与JS交互小例子,其中涉及APP向JS提交信息,和JS提交信息给App
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Unity IOS审核被拒,解决办法,去网上看了好多帖子,...