RAMAN RANA RAMAN RANA - 6 months ago 21
iOS Question

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

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

Answer

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]]];
Comments