我需要根据内容高度调整Web视图框架的大小。所以我需要计算内容的高度。
这是我使用的解决方案
NSUInteger contentHeight = [[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document.body.scrollHeight;"]] intValue];
您的网络视图的框架应小于所有可能的内容大小
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句