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)
转载于:https://www.cnblogs.com/Free-Thinker/p/4833902.html