I am using plist to load the tableview, which works fine, then i have a directory of html files in resources, now i need to load each file when selected in tableView, into a webView which is in detailView,
any help would be greatly appreciated,
any help would be greatly appreciated,
Code:
- (void)setDetailItem:(id)newDetailItem {
if (detailItem != newDetailItem) {
[detailItem release];
detailItem = [newDetailItem retain];
// Update the view.
navigationBar.topItem.title = [detailItem description];
}
if (popoverController != nil) {
[popoverController dismissPopoverAnimated:YES];
}
}
- (void)viewDidLoad {
[super viewDidLoad];
NSString *urlAddress =[[NSBundle mainBundle] pathForResource:@"Cars" ofType:@"html"inDirectory:@"Cars"];
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];}
Last edited by a moderator: