RAMAN RANA RAMAN RANA - 1 year ago 89
iOS Question

How can I load a local HTML file into the UIWebView?

How can we load our own html file into the UIWebView?


The following code will load an HTML file named index.html in your project folder:

[WebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"]isDirectory:NO]]];