title: How to load local html file into UIWebView
body: <p>I'm trying to load a html file into my UIWebView but it won't work. Here's the stage: I have a folder called html_files in my project. Then I created a webView in interface builder and assigned an outlet to it in the viewController. This is the code I'm using to append the html file:</p>
  
  <pre><code>-(void)viewDidLoad
  {
      NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"html" inDirectory:@"html_files"];
      NSData *htmlData = [NSData dataWithContentsOfFile:htmlFile];
      [webView loadData:htmlData MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:@""]];
      [super viewDidLoad];
  }
  </code></pre>
  
  <p>That won't work and the UIWebView is blank. I'd appreciate some help.</p>