Simon Walachowski Simon Walachowski - 6 months ago 53
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.

let url = URL (string: "")       

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