Hi Everyone.
I cannot display a local html file when called from the NSMutable array. (code below)
No problem displaying image or pdf.
I am using UIwebview. The name of the file is a string that should be read from the array like so:
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"%@" ofType:@"html"] isDirectory:NO]]];
pathForResource:@"%@" is the string to be read from the array eg January string, so I want January.html to open if selected in table, or February.html if selected (in iPad).
The array contains each string for the tables in splitView popover
I have been working at this for days and cannot solve it, but I know there is a simple solution somewhere. I have pasted the method as it is below.
Thank you anyone who can help
- (void)setDetailItem

id)newDetailItem {
if (detailItem != newDetailItem) {
[detailItem release];
detailItem = [newDetailItem retain];
// Update the view.
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle
mainBundle] pathForResource:@"%@" ofType:@"html"] isDirectory:NO]]];
[self configureView];
}
if (self.popoverController != nil) {
[self.popoverController dismissPopoverAnimated:YES];
}
}