Hello, could someone give me a hand? Have a TableView that loads individual ppt files from a folder called powerpoints. I am now trying to get those to display in a UIWebView in a different ViewController. In my TableView didSelectRow I have:
In my viewDidLoad of the other ViewController with the webView, I have:
But this crashes with error:
Any ideas?
Code:
NSString *selectedCountry = [self.files objectAtIndex:indexPath.row];
Songs *dvController = [[Songs alloc] initWithNibName:@"Songs" bundle:[NSBundle mainBundle]];
dvController.selectedCountry = selectedCountry;
[self.navigationController pushViewController:dvController animated:YES];
[dvController release];
dvController = nil;
Code:
NSString *thetitle = [[selectedCountry lastPathComponent] stringByDeletingPathExtension];
self.title = thetitle;
NSString *path = [[NSBundle mainBundle] pathForResource:selectedCountry ofType:@"ppt"];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[savedweb loadRequest:request];
Code:
-[NSURL initFileURLWithPath:]: nil string parameter'
Any ideas?