View Full Version : Loading webview results in error

Jul 23, 2010, 09:14 PM
Im trying to load a webview into the detailview of a split-view ipad-app.

Problem is, no matter if I try loading it with a local html-file or an external one using a url, I get the same error:

Expected ':' before '.' token

NSString *urlAddress = @"http://www.google.com";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[DetailViewController.webView loadRequest:requestObj]; // This line gives the error

Its driving me nuts, since Im using the exact same code to load a webview in an iphone-app.

Any ideas?

Jul 23, 2010, 10:21 PM
DetailViewController is probably your class name and not your instance name.

Jul 24, 2010, 06:57 AM
Indeed you are correct :P

Thanks, this was really driving me crazy - hate when you go blind to a letter :)