首页 > Web开发 > 详细

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

时间:2015-06-16 16:11:44      阅读:238      评论:0      收藏:0      [点我收藏+]

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"]);
}

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

原文:http://www.cnblogs.com/Keys/p/4580672.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!