获取UIWebView的内容高度
本文转载至 http://i.cnblogs.com/EditPosts.aspx?opt=1
- #pragma mark - UIWebview delegete
- - (void)webViewDidFinishLoad:(UIWebView *)webView
- {
- CGFloat height = [[webView stringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight"] floatValue];
- CGRect frame = webView.frame;
- webView.frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, height);
- }
http://blog.csdn.net/aluoshuai/article/details/7708879