I'm trying to get the UIWebView scroll content size inside - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
method so as to show an arrow image if horizontal scroll exists.
1) I have tried webView.scrollview.contentSize
to get the scroll content size but it is always giving me the webview frame values even if content size is more.
2) I have tried
CGSize contentSize = CGSizeMake([[webView stringByEvaluatingJavaScriptFromString:@"document.body.scrollWidth;"] floatValue],
[[webView stringByEvaluatingJavaScriptFromString:@"document.body.scrollHeight;"] floatValue]);
Even the above 2nd approach is not giving the proper content size.
Is their a straight forward or screwed way of getting accurate webview's embedded scrollView's content size?