title: UIWebview iPhone loading bundle resources
body: <p>I'm trying to load images from the bundle to a uiwebview.</p>
  
  <p>the code i'm currently using is </p>
  
  <pre><code>NSString *path = [[NSBundle mainBundle] bundlePath];
  NSURL *baseURL = [NSURL fileURLWithPath:path];
  [webView loadHTMLString:htmlString baseURL:baseURL];
  </code></pre>
  
  <p>when i open the view the application closes and opens safari and an error message pops with 'Safari cannot open the file. The error was: "file is directory".'</p>
  
  <p>if i set the baseURL as nil then the page loads correctly (although without the images).</p>
  
  <p>Any suggestions?</p>