首页 > 代码库 > webViewcell中调整高度
webViewcell中调整高度
- (void)webViewDidFinishLoad:(UIWebView *)webView {
for (UIScrollView *view in webView.subviews) {
// int miHeight;
if ([view isKindOfClass:[UIScrollView class]]) {
NSString *str = [webView stringByEvaluatingJavaScriptFromString:@"document.body.scrollHeight;"];
int iHeight = [str intValue];
if (iHeight<10) {
iHeight = 10;
}
webHeight = iHeight;
webView.frame = CGRectMake(0, 166, 320, webHeight+166);
// NSDictionary *dic = [[NSDictionary alloc] initWithObjectsAndKeys: nil];
//
// [dic setValue:[NSString stringWithFormat:@"%d",iHeight] forKey:[NSString stringWithFormat:@"%d",webView.tag]];
[self onl oadFinish:(WebViewCell *)webView.superview.superview];
}
}
}
- (void)OnLoadFinish:(WebViewCell *)sender {
[m_tableview beginUpdates];
//..........
[m_tableview endUpdates];
}
webViewcell中调整高度