uchicago-mobi / 2015-Winter-Forum

8 stars 1 forks source link

UIWebView not displaying anything #140

Closed mceruzzi-denodo closed 9 years ago

mceruzzi-denodo commented 9 years ago

I can't get my UIWebView to show anything. Even when I physically hardcode:

NSString string = @"www.yahoo.com"; NSURL url= [NSURL URLWithString:string]; [self.web loadRequest:[NSURLRequest requestWithURL:url]];

Into the detailViewController's viewDidLoad method. i set it's delegate as the detailViewController and created an IBOutlet. I'm at a loss. Any ideas?

johnnypaper commented 9 years ago

I copied and pasted this into a single view app with only a webview. Here is your problem...

The code is fine, you need to change the string to @"http://www.yahoo.com"

It appears it won't work without the http://

mceruzzi-denodo commented 9 years ago

^Thanks!