My webview is not showing up. (Just a blank white page) I have a TabBarController and two ViewControllers. One of them containing the webview.
My code:
import Foundation
import UIKit
class HomeViewController: UIViewController, UIWebViewDelegate {
@IBOutlet var webView: UIWebView!
var urlpath: String = "http://www.google.de"
func loadAddressURL(){
let requesturl = NSURL(string: urlpath)
let request = NSURLRequest(URL: requesturl!)
webView.loadRequest(request)
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
loadAddressURL()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Whats wrong here?