加载本地Html
来源:互联网 发布:服务器虚拟化软件 编辑:程序博客网 时间:2024/05/20 12:24
1. NSString *basePath = [[NSBundlemainBundle]bundlePath];
NSString *relPath = [basePathstringByAppendingPathComponent:@"AAAA/index.html"];
NSString *myText = [NSStringstringWithContentsOfFile:relPathencoding:NSUTF8StringEncodingerror:nil];
UIWebView *web = [[UIWebViewalloc]initWithFrame:CGRectMake(0,0,320,self.view.frame.size.height)];
[web loadHTMLString:myTextbaseURL:[NSURLfileURLWithPath:relPath]];
[self.view addSubview:web];
2. NSString *filePath = [[NSBundle mainBundle]pathForResource:@"1" ofType:@"html"];
NSURL *url = [NSURL fileURLWithPath:filePath];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[myWebView loadRequest:request];
[self.view addSubview:web];
- 加载本地Html文件
- WebView加载本地HTML
- 加载本地Html
- webview 加载本地html
- UIWebView加载本地html
- webViwe加载本地html
- mono加载本地html
- iOS 加载本地html
- UIWebView加载本地html
- 加载本地Html文件
- android 加载本地html
- 加载本地HTML文件
- 加载本地HTML文件
- UIWebView加载本地html
- UIWebView加载本地html
- 加载本地HTML文件
- iOS加载本地HTML
- django加载本地html
- EMV技术学习和研究(十)联机处理 以及 交易结束
- IAAS云计算产品畅想-公有云主机产品优势
- 使用Android.util的 Log类可以实现Android输出Log这一操作。
- Unity3D 基本动画的学习
- CheckBoxPreference使用
- 加载本地Html
- oracle笔记2
- Android Support Library 介绍~在项目总如何使用android支持库
- 11 Reasons Why You Should Never Get a Full-Time Job
- Implementing a delegate chain system in Objective-C
- Eclipse快捷键大全
- NSExpression
- Windows--windows 7远程登录命令
- Closure and anonymous functions in Objective-C