ios webview

//#pragma mark - UIWebView Delegate Methods
-(void)webViewDidFinishLoad:(UIWebView *)webView{
    //获取到webview的高度
    CGFloat height = [[_webView stringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight"] floatValue];
    _webView.frame = CGRectMake(_webView.frame.origin.x,_webView.frame.origin.y,kScreenW, height+20);
}
posted @ 2019-05-15 18:17  哈特中尉  阅读(138)  评论(0编辑  收藏  举报