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 trialSamuel Catchpole-Radford
1,575 PointsLoad the previously created 'urlRequest' object within the 'webView' object.
This is my code, but its not working??? any answers.
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];
4 Answers
Samuel Catchpole-Radford
1,575 Pointsi figured it out, in the line of code before i had: NSURL *urlRequest = [NSURLRequest requestWithURL:url];
it needed to say
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
thanks for your help.
Patrick Donahue
9,523 PointsRemove the "/" at the end of the URL.
Samuel Catchpole-Radford
1,575 Pointseven without the "/" i get this message:
Bummer! Create a NSURL object using the method 'URLWithString'!
Patrick Donahue
9,523 PointsWeird. Try adding the www? I am not on a computer to try it out.
Patrick Donahue
9,523 PointsPatrick Donahue
9,523 PointsGood job - i feel silly missing that!