Simon Walachowski Simon Walachowski - 1 year ago 109
Swift Question

Adding address to web view

I try to add address in several ways, but it's not working all the time. Anybody know the right code?

import UIKit

class ViewController: UIViewController {
@IBOutlet weak var Dziennik: UIWebView!

override func viewDidLoad() {
// Do any additional setup after loading the view, typically from a nib.

webView.loadRequest(NSURLRequest(URL: NSURL(string: "")!))

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

Answer Source
let url = URL (string: "")       

let requestObj = URLRequest(URL: url!); Dziennik.loadRequest(requestObj)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download