Loading webview results in error

Discussion in 'iOS Programming' started by Danneman101, Jul 23, 2010.

  1. Danneman101 macrumors 6502

    Aug 14, 2008
    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. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    DetailViewController is probably your class name and not your instance name.
  3. Danneman101 thread starter macrumors 6502

    Aug 14, 2008
    Indeed you are correct :p

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

Share This Page