title: Frame of UIWebView inside UIScrollView does not stretch size to fit all of contents
body: <p>In a small app that is loading web content from a blog, the UIWebView (which is inside a UIScrollView to be scrollable) will not scroll all of the content into view if it is longer than the actual UIScrollView's frame. Here is an image of the problem:</p>
  
  <p><a href="http://i.imgur.com/G4G4C.png" rel="nofollow">http://i.imgur.com/G4G4C.png</a></p>
  
  <p>The code that loads the UIScrollView and the UIWebView (this is part of a UIViewController)</p>
  
  
  
  <pre class="lang-c prettyprint-override"><code>- (id)initWithHTML:(NSString*)html
  {
      self = [super init];
      if (self) {
          CGRect appFrame = [[UIScreen mainScreen] applicationFrame];
          UIScrollView* v = [[UIScrollView alloc] initWithFrame:appFrame];
          self.view = v;
  
          UIWebView* webView = [[UIWebView alloc] initWithFrame:v.frame];
          webView.userInteractionEnabled = NO;
          webView.backgroundColor = [UIColor whiteColor];
          [self.view addSubview:webView];
  
          [webView loadHTMLString:html baseURL:nil];
          CGSize sz = v.bounds.size;
          sz.height = webView.bounds.size.height + 20;
          v.contentSize = sz;        
  
          [v release];
          [webView release];
      }
      return self;
  }
  </code></pre>