I have a view controller which has various components while a webview at its bottom everything is inside ScrollView but I ended up with double scroll one of main scrollview and one in the webview. How can I set the height of the main view to increase dynamically so that the webview would take its full height and I don't get a double scroll? I have tried something like this:
func webViewDidFinishLoad(webView: UIWebView) {
myWebView.frame.size.height = 1
myWebView.frame.size = webView.sizeThatFits(CGSizeZero)
}
from this answer :here
As suggested in the answer below I did this
mainScroll.contentSize = CGSizeMake(mainScroll.contentSize.width, mainScroll.contentSize.height + webView.scrollView.contentSize.height);
that increased the height of scrollview according to content size of webview but the height of UIWebview remaided the same..