我正在尝试在容器视图中加载一个Web视图,该视图基本上是主视图中的UIView。但不管怎么说它没有加载。
var urlString : String!
var termsAndConditionsWebView : WKWebView!
@IBOutlet var containerView: UIView!
override func loadView() {
super.loadView()
//self.termsAndConditionsWebView.frame = containerView.frame
//self.termsAndConditionsWebView.sizeToFit()
self.termsAndConditionsWebView = WKWebView()
containerView = termsAndConditionsWebView
}
override func viewDidLoad() {
super.viewDidLoad()
let url = NSURL(string: "https://www.google.com.sg")
let request = NSURLRequest(URL: url!)
termsAndConditionsWebView.loadRequest(request)
}