Skip to content

Instantly share code, notes, and snippets.

@srgtuszy
Created May 5, 2011 11:07
Show Gist options
  • Save srgtuszy/956883 to your computer and use it in GitHub Desktop.
Save srgtuszy/956883 to your computer and use it in GitHub Desktop.
UIWebView content size without javascript
CGRect webViewFrame = [self.webView frame];
webViewFrame.size.height = 1;
[self.webView setFrame:webViewFrame];
CGSize fittingSize = [self.webView sizeThatFits:CGSizeZero];
webViewFrame.size = fittingSize;
[self.webView setFrame:webViewFrame];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment