计算UIWebView的高度

- (void)webViewDidFinishLoad:(UIWebView *)webView

{

//获取webview的标题

self.title = [webView stringByEvaluatingJavaScriptFromString:@"document.title"];

//获取webview的高度

CGFloat height = [[webView stringByEvaluatingJavaScriptFromString:@"document.body.scrollHeight"] floatValue];

}

你可能感兴趣的:(计算UIWebView的高度)