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 trial

iOS Build a Blog Reader iPhone App Viewing a Web Page Implementing a UIWebView

Caleb Kleveter
MOD
Caleb Kleveter
Treehouse Moderator 37,862 Points

I thought I had this one.

On step 3 of this code challenge I'm supposed to "Load the previously created 'urlRequest' object within the 'webView' object."

I got this message: Bummer! Load the 'webView' object using the method 'loadRequest'!

What's wrong with my code?

UIWebView *webView = [[UIWebView alloc] init];
/* Write your code below this line */
NSURL *url = [NSURL URLWithString:@"http://teamtreehouse.com/"];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
[self.webView loadRequest:urlRequest];

2 Answers

Michael Curtis
Michael Curtis
6,684 Points

Try dropping self as there is no indication that this object is a property and so may not be accessible via dot notation.

[webView loadRequest:urlRequest];

Caleb Kleveter
MOD
Caleb Kleveter
Treehouse Moderator 37,862 Points

Sorry I didn't update this post, I searched the forum and found a post that helped me. Thanks for your help any way.