I have disqusView(link) in UIWebView, I want to scroll webView as the size of disqusView, I don't want default scroll of webView
here is my code, in these I'm getting more height then actual height of webView content size.
func webViewDidFinishLoad(webView: UIWebView) {
let cgfloat = web_discus.scrollView.contentSize.height as CGFloat
}
or
web_discus.stringByEvaluatingJavaScriptFromString("document.hight")! as String
but both give more height then actual that`s why it show more blank space while scrolling down..
I also tried this one :
web_discus.stringByEvaluatingJavaScriptFromString("document.body.offsetHeight")! as String
Is there any way to get perfect hight for webView content ?