RAMAN RANA RAMAN RANA - 7 months ago 35
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]]];