The problem:
NSString *str = [[NSString alloc] initWithString:theList.artist];
NSLog(@"%@",str); // Log gives me the correct string...
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:str]];
[self.webView loadRequest:request];
NSLog(@"%@", request); //Log returns <NSURLRequest (null)>
Then if I try:
NSString *str = [[NSString alloc] initWithString:@"http://totssants.com/index.html"];
//which is the actual URL I am trying to load
Everything goes fine… I can pass the string everywhere else but not to the request…
Could be that a problem with the XML I am parsing?
Thanks!
Try
And make sure there is no whitespace at the beginning or end of
theList.artist. That will mess it up too. Has happened to me more than once.