美文网首页
swift UIWebView的基础用法

swift UIWebView的基础用法

作者: 水跃龙纹 | 来源:发表于2018-06-07 15:56 被阅读0次

import UIKit

import Foundation

class ViewController:UIViewController{

    override funcviewDidLoad() {

        super.viewDidLoad()

//        初始化

        let wbView =UIWebView(frame:CGRect(x:0, y:40, width:self.view.frame.size.width, height:self.view.frame.height))

        self.view.addSubview(wbView)

//        添加地址

                       wbView.loadRequest(URLRequest(url:URL(string:"https://www.baidu.com")!))

    }

}

相关文章

网友评论

      本文标题:swift UIWebView的基础用法

      本文链接:https://www.haomeiwen.com/subject/wnmgsftx.html