I m working for a project where in a view i had a few labels at the top and a web view in the bottom whose content changes dynamically from the server.I wanted the view to scroll till the web view content which is not happening when auto layout is enabled.
In this way i changed the frame of the Web view
(void)webViewDidFinishLoad:(UIWebView *)webView { //giving view default width and event content length as height CGSize myWebViewTextSize = [webView sizeThatFits:CGSizeMake(self.view.frame.size.width,[myCalendarObj.event_content length])];
CGRect myWebViewFrame = webView.frame; myWebViewFrame.size.height = myWebViewTextSize.height;
//setting frame size of web view to display dynamic content string webView.frame = myWebViewFrame;
webView.scrollView.scrollEnabled=NO;
//setting content size of scrollview equal to web view content to scroll till the end [scrollView setContentSize:CGSizeMake(self.view.frame.size.width,(myWebViewTextSize.height+200))];
}
This is worked for me when i disabled auto layout but i wanted this when auto layout is enabled.
Please help me on this issue
Thanks in Advance