UIWebView自适应高度
2018-07-20 来源:open-open
//webview自适应高度 delegate里面实现
- (void)webViewDidFinishLoad:(UIWebView *)webView
{
NSString *height_str= [webViewstringByEvaluatingJavaScriptFromString: @"document.body.offsetHeight"];
heightCell = [height_str intValue];
webView.frame = CGRectMake(0,0,320,heightCell);
NSLog(@"height: %@", [webViewstringByEvaluatingJavaScriptFromString: @"document.body.offsetHeight"]);
}
//禁止web滑动
jobRequestWeb.scrollView.bounces = NO;
//取消web右边滑动条
jobRequestWeb.scrollView.showsVerticalScrollIndicator = NO;
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点!
本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。
上一篇:php数据库备份脚本
下一篇:golang 获取ip代码
最新资讯
热门推荐