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 trialKai Aldag
Courses Plus Student 13,560 Points2/2 UIWebView challenge
hey so i easily did the first section but the second i had some issues so i went to the forum read some stuff and copy and pasted what worked for others. but its not working for me here my code:
UIWebView *webView = [[UIWebView alloc] init];
/* Write your code below this line */
NSURL *url = [NSURL URLWithString:@"http://teamtreehouse.com/"];
[webView loadRequest:urlRequest];
Kai Aldag
Courses Plus Student 13,560 Pointsi got it thanks it
9 Answers
Amit Bijlani
Treehouse Guest TeacherStefan Buttigieg and Lamar Greene I have modified this challenge to reflect clearly what is required. Please re-take it and let me know if you are still having issues.
Stefan Buttigieg
10,065 PointsReposted this so that to make sure you got my acknowledgment!
Woohoo :)! Finally completed the iPhone Blog Reader App module! Thank you so much Amit!
Lamar Greene
9,581 PointsThank You! Mine is now working as well!
Amit Bijlani
Treehouse Guest TeacherYour code was almost right. In the last line you have: [webView loadRequest:urlRequest];
except that the object is called url
and not urlRequest
.
Jarek Toro
3,992 PointsNSURL *url = [NSURL URLWithString:@"http://teamtreehouse.com/"];
this line isn't getting accepted for me for the first part thanks
Amit Bijlani
Treehouse Guest TeacherJust pasted that line in the code challenge and it worked for me.
Jarek Toro
3,992 Pointsyeah i had to refresh the page and it worked thanks!!
Thanks for the lessons in general also i really appreciated it!!!
Matthew Waller
1,698 Pointsso I'm having the same trouble. My code for the second part is
[webView loadRequest:url];
is that not right?
Matthew Waller
1,698 Pointsso I'm having the same trouble. My code for the second part is
[webView loadRequest:url];
is that not right?
Amit Bijlani
Treehouse Guest TeacherThat looks right. Did it not work?
Matthew Waller
1,698 PointsFinally got it. It did work! Can't remember what the problem was now, but that essentially worked.
Stefan Buttigieg
10,065 PointsSomehow here the code still not working. Any help would be appreciated!
Lamar Greene
9,581 PointsI tried the above for challenge 2,
[webView loadRequest:url];
and I cannot get my code to pass...
Stefan Buttigieg
10,065 PointsIt would be really great if a solution is found because this is preventing me from finishing this course :( !
Basically [webView loadRequest:url];
is not working :( ! Thanks in advance for your help!
Stefan Buttigieg
10,065 PointsWoohoo :)! Finally completed the iPhone Blog Reader App module! Thank you so much Amit!
Tobias Mahnert
89,414 PointsCode does not work. Whats wrong?
UIWebView *webView = [[UIWebView alloc] init];
/* Write your code below this line */
NSURL *url =[NSURL URLWithString:@"http://teamtreehouse.com/"];
NSURL *urlRequest = [NSURLRequest requestWithURL:url];
[webView loadRequest:urlRequest];
Brett Kim
11,576 PointsSame, my [webView loadRequest:urlRequest]; for some reason isn't working. Stefan Buttigieg and Amit Bijlani , do you know why the compiler does not accept?
Caleb Kleveter
Treehouse Moderator 37,862 PointsI know this is an old post, but the code below did not work on the 3rd part of the challenge.
[webView loadRequest:url];
Caleb Kleveter
Treehouse Moderator 37,862 PointsUmmm, never mind; it worked when I changed it to:
[webView loadRequest:urlRequest];
Mike Bronner
16,395 PointsMike Bronner
16,395 PointsTry this:
UIWebView *webView = [[UIWebView alloc] init]; [webView loadRequest: [NSURLRequest requestWithURL: [NSURL URLWithString: @"http://team treehouse.com"]];
Hope this helps :)