title: Fit content to width in UIWebView
body: <p>I have a UIWebView that is loading data that comes from a web service.  It can be sent a pdf, a tiff, text, or multiple other types of data.  That much of it works great.  The problem I am having is, on the iPhone I would like the content to fill the UIWebView (scaled down if needed) without having to scroll horizontally.</p>
  
  <p>I'm seen multiple questions about this, but it doesn't seem like the answers to several of them actually work.  </p>
  
  <p>I have selected Scales Page To Fit for the webview in the storyboard builder. This does scale it down a great bit, but I still have to scroll to see the document.</p>
  
  <p>As recommended in another question, I have tried using javascript to scale my content in the  webViewDidFinishLoad method with:</p>
  
  <pre><code>NSString *jsCommand = [NSString stringWithFormat:@"document.body.style.zoom = %f;",zoomAmount];
  [webViewF stringByEvaluatingJavaScriptFromString:jsCommand];
  </code></pre>
  
  <p>But this doesn't seem like a good way to do it. It flickers to re-adjust the size, and I'm not sure of the best way to figure out the zoom ratio anyway.</p>
  
  <p>Does anyone know the correct way to size content in a UIWebView so that it fills the screen horizontally by default? </p>