取到WebView的高度
2016-09-22 本文已影响18人
InitWithYou
- (void)webViewDidFinishLoad:(UIWebView *)webView {
CGFloat height = [[webViewstringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight"] floatValue];
CGRect frame = webView.frame;
webView.frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, height);
}