UIWebView not loading URL in simulator

1.3k views Asked by At

I've been having trouble getting the UIWebView to load a specific url page, after running the app through simulator for the first time everything seems to work the url loads just fine. But since i've turned off my mac and tried running the app again through simulator it's not showing the set page.

I know the code that i'm using works because it was working the first time and i did not make any changes to it.

If its not the piece of coding i'm using then what could it be? I've read all the post that is in stackoverflow in regards to URL not loading in UIWebView tried everyones suggestion on those posts and still i could not seem to get the page to load.

here is what i've done, again i ran the very same code the first time and it worked but now it just sits on blank white page.

import UIKit

class infoViewController: UIViewController {

    @IBOutlet var info: UIWebView!

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.

        var url = NSURL(string: "http://iglesianicristo.net/directory/Australia%20West/Darwin/44844")
        var request = NSURLRequest(URL:url!)
        info.loadRequest(request)
    }

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

There are 0 answers