NSURL add parameters to fileURLWithPath method

Viewed 10430

I use this line of code to load a local html file into a web view:

NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"html"]];

However I want to add some http parameters to the url with no luck so far.

I've tried this:

url = [url URLByAppendingPathComponent:@"?param1=1"];

But after this a html doesn't load in webview.

Is there a way to load local html file in webview with params ?

3 Answers
Related