Swift代码实现加载WEBVIEW
2015-09-23 23:27
447 查看
let webview = UIWebView(frame:self.view.bounds) webview.bounds=self.view.bounds //远程网页 webview.loadRequest(NSURLRequest(URL: NSURL(string:"http://jinzhe.net")!)) //项目资源 webview.loadRequest( NSURLRequest( URL: NSURL( fileURLWithPath: NSBundle.mainBundle().pathForResource("index", ofType: "html")! )! ) ) self.view.addSubview(webview)
相关文章推荐
- xcode自动生成project-swift.h出错
- swift中变量的几种类型
- 黑马程序员——Swift学习笔记:流程控制
- 黑马程序员——Swift学习笔记:流程控制
- Swift 类的使用
- swift2.0 之 关键字
- Swift语言 入门教程
- Swift 2.0新特性
- UI基础控件 Swift
- swift 学习 3
- swift -2 元组,函数
- Swift2的更改
- 【面试必备】Swift 面试题及其答案
- Swift多种实现单例写法
- Pods written in Swift can only be integrated as frameworks
- Swift单例写法(推荐)
- swift开发笔记6 - 在表格单元格中添加按钮
- Swift 最佳实践(未完待续)
- swift 基本数据类型--字符串
- Swift中元组及函数