title: WebFrame loadData not working?
body: <p>I'm trying to make a WebView load a page from HTML code I have stored as an NSData. I get a blank page when I try to do this. Is there anything wrong with what I'm doing when I load the page? If not, I need to look elsewhere in my program.</p>
  
  <pre><code>if (essence.html){ //essence.html is an NSData
      NSLog(@"Inserting HTML code into browser window: %@", [[NSString alloc] initWithData:essence.html encoding: NSUTF8StringEncoding]);
      [webView.mainFrame loadData:essence.html MIMEType: @"text/html" textEncodingName: @"utf-8" baseURL:nil]; //webView is a WebView
  }
  </code></pre>
  
  <p>I created the conditions so essence.html contains HTML code from the page <a href="http://kathleenmelian.com/test.html" rel="nofollow">http://kathleenmelian.com/test.html</a> (which just says "hello"). The NSLog prints this when the above code runs:</p>
  
  <pre><code>Inserting HTML code into browser window: &lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;hello&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>So essence.html definitely contains valid code that a browser should be able to load.</p>