Loading webview results in error

Discussion in 'iPhone/iPad Programming' started by Danneman101, Jul 23, 2010.

  1. macrumors 6502

    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?
  2. Moderator


    Staff Member

    DetailViewController is probably your class name and not your instance name.
  3. macrumors 6502

    Indeed you are correct :p

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

Share This Page