Re: URL to html file in the application package
Re: URL to html file in the application package
- Subject: Re: URL to html file in the application package
- From: Stéphane Sudre <email@hidden>
- Date: Mon, 6 Dec 2004 05:06:36 +0100
On Dec 6, 2004, at 4:37 AM, Kristofer Szymanski wrote:
Hello,
I use:
- (IBAction)releaseNotes:(id)sender
{
NSString *urlClear = [NSString
stringWithString:@"file:///Library/Documentation/Test/index.html"];
[[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL
URLWithString:urlClear]]];
}
to display html page with release notes in a web view but I wonder
what the URL should be if the file is in the /Contents/Resources
folder in the application package?
To obtain the path to your file, you can use:
[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"];
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden