iPhone SDK: WebView how to specify a local URL?

iphone

Solution

This is the only code that worked for me.

NSString *path = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"SettingsHelp.html"];        
NSURL *url = [NSURL fileURLWithPath:path isDirectory:NO];
NSURLRequest *request = [NSURLRequest requestWithURL:url];

Thanks all for the help.

Problem

I have HTML files that I want to load locally. I have included the files in the resources folder in XCode. I am not sure what the syntax is to load them. This is the code I use to connect to say google. ``` NSString *urlAddress=@"http\\someurl"; NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; [webHelpView loadRequest:requestObj]; ``` Could someone provide an example where a HTML file is loaded locally. Thanks in advance.

Original source