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 OnLoadFinish:(WebViewCell *)webView.superview.superview];
}
}
}
- (void)OnLoadFinish:(WebViewCell *)sender {
[m_tableview beginUpdates];
//..........
[m_tableview endUpdates];
}
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。