UIWebView获得内容的高-作出自适应高的UIWebView

http://blog.csdn.net/matrixhero/article/details/8443972

- (void)webViewDidFinishLoad:(UIWebView *)webView
{
NSString *height_str= [webView stringByEvaluatingJavaScriptFromString: @"document.body.offsetHeight"];
int height = [height_str intValue];
webView.frame = CGRectMake(0,0,320,height);
NSLog(@"height: %@", [webView stringByEvaluatingJavaScriptFromString: @"document.body.offsetHeight"]);
}

原文地址:https://www.cnblogs.com/Keys/p/4580672.html