It seems no matter what I do, I can’t get my UIWebView to load a new URL. It receives the load request, but nothing I do seems to actually make it do anything.
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
urlToVisit = [self.arrayOfURLs objectAtIndex:[indexPath row]];
[self dismissModalViewControllerAnimated:YES];
[tableView deselectRowAtIndexPath:indexPath animated:YES];
[WebViewToViewData loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlToVisit]]];
//[WebViewToViewData stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"location.href='%@''",urlToVisit]];
}
as you can see, I have it loading the URL from a string (this is for testing purposes, but it doesn’t work with anything) and it receives the request, but doesn’t start loading. I’ve tried:
[WebViewToViewData reload];
and that doesn’t do anything. I can’t even get the reload function to work anywhere. What could I possibly be doing wrong?
I had it set to a Modal Window and what I ended up doing is changing the Modal window to a different animation so that it would fire viewDidAppear and have the function in there. As for sending the values back and forth and I used a NSUserDefaults.
This was by far the silliest error I’ve had.