I have tried a bunch of "solutions" but for right now I am trying to figure out the content size of the scrollview of a UIWebView. It is currently always returning 1024 which is the width of the device. This doesn't make sense since I am querying the height and the view is in portrait orientation.
The following code reports the height as 1024.00000
-(void)webViewDidFinishLoad:(UIWebView *)webView {
float sourcesWebViewHeight = [[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.scrollHeight"] floatValue];
NSLog(@"%f", sourcesWebViewHeight);
}
But I only have a few lines of text.