I try to load a URL(in string format) to a UIWebView, but instead of showing the webpage, it shows the URL. Here’s my code:
URL = @"www.Google.com"
NSString *path = [[NSBundle mainBundle] bundlePath];
baseURL = [NSURL fileURLWithPath:path];
[webView clearsContextBeforeDrawing];
[webView loadHTMLString:URL baseURL:baseURL];
[webView setNeedsLayout];
loadHTMLString:baseURL:takes the html page content as input and not just URL in string form. It treatswww.Google.comas a html string and it gets shown. You will have to do,