Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSakina Burch
1,853 PointsLoad the previously created 'urlRequest' object within the 'webView' object.
[self.webView loadRequest : urlRequest]; not working
5 Answers
Stone Preston
42,016 Pointshmm try this: i just passed with it, your code should have worked not sure whats going on with it
NSURL *url = [NSURL URLWithString:@"http://teamtreehouse.com/"];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
[webView loadRequest:urlRequest];
Stone Preston
42,016 Points[self.webView loadRequest : urlRequest];
wont work because you dont have a property called webView, you have a local variable called webView already created for you
UIWebView *webView = [[UIWebView alloc] init];
/* Write your code below this line */
all you have to do is reference the webView variable that was created for you at the very beginning, not a property called webView (hint: you dont have to use self since its not a property)
Sakina Burch
1,853 Pointsok still no luck. Tried several things here are two [webView loadRequest : urlRequest]; webView [loadRequest : urlRequest];
Load the 'webView' object using the method 'loadRequest' is the error message
Stone Preston
42,016 Pointsthe first one looks like it should have worked. try
[webView loadRequest:urlRequest];
the challenge engine is picky about spacing in method calls.
Sakina Burch
1,853 PointsNo working Still getting this error message. Load the 'webView' object using the method 'loadRequest'!
Sakina Burch
1,853 PointsThank you, thank you The second Line was where I found the error.