0
我想增加webview的大小,根據Html文本行,但我的網絡視圖大小不正確,內在我顯示的內容在固定幀,稍後時用戶選擇行我需要擴大電池accoriding到HTML文本,請幫我解決這個,這是我使用的代碼是如何動態chnage webview的高度根據HTML文本
enter code here NSLog(@"web view and selected ==== %d ---%d",webView.tag,selectedRow);
//CGFloat webViewHeight = 0.0f;
if (webView.subviews.count > 0) {
UIView *scrollerView = [webView.subviews objectAtIndex:0];
if (scrollerView.subviews.count > 0) {
UIView *webDocView = scrollerView.subviews.lastObject;
if ([webDocView isKindOfClass:[NSClassFromString(@"UIWebDocumentView") class]])
webViewHeight = webDocView.frame.size.height;
NSLog(@"web view height is %d",webViewHeight);
}
}