I have a local html file in my xcode project. but i can't load that local html file with UIWebView.
The code to achieve your request is:
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0,
self.view.frame.size.height,self.view.frame.size.width)];
NSString *indexPath = [NSBundle pathForResource:@"index" ofType:@"html" inDirectory:nil];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:indexPath]]];
[self.view addSubview:webView];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With