UIWebView獲得內容的高-作出自適應高的UIWebView
- (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"]); }廢話不多說 上代碼~~~求相互交流~
最後更新:2017-04-04 07:03:14
上一篇:
Design Pattern: Factory Method 模式
下一篇:
iPhone5易彎曲的六大理由猜想
收到“雲棲”商城發的禮物了,T恤,電腦包和書
C/C++:如何理解複雜的聲明
清除壁壘 大數據推動城市規劃質突破
一文讀懂物聯網、雲計算與大數據的關係
SpringBoot開發案例之整合定時任務(Scheduled)
android.view.inflateexception binary xml file line 異常的解決方法
linux常用命令之ps(詳細參數講解)
特寫 | 人工智能背後的臨時工
Following unknown configure options were used:--enable-fpm
Java包及訪問控製權限--(private/default/protected/public)及命名規範