Swift 3.0中 怎么设置WebView的URL地址?

我的代码如下,一直通不过……

[Swift] 纯文本查看 复制代码
import UIKit

class ViewController: UIViewController {
    
    
    //@IBOutlet var wv:UIWebView

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        
        //@IBOutlet var wv:UIWebView
        var wv:UIWebView
        var myurlstring = "http://www.swifthumb.com"
        //var myurl = NSURL("http://www.swifthumb.com")
        var myurl = NSURL(string:"http://www.swifthumb.com")
        var myreq = NSURLRequest(url: myurl as! URL )
        wv.loadRequest(myreq as! URLRequest)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}



Swift 3.0中 怎么设置WebView的URL地址?

Swift 3.0中 怎么设置WebView的URL地址? - 敏捷大拇指 - Swift 3.0中 怎么设置WebView的URL地址?