views:

163

answers:

1

I have a UITextField, a UIButton, and a UIWebView nested in a UIView, which is nested in a UIScrollView. After the UIWebView has loaded its content, I need it to resize the UIWebView and UIView so that the UIScrollView will scroll.

I currently have the UIScrollView getting its contentSize from the UIView, but I can't figure out how to do the resizing after the UIWebView's content has loaded.

A: 

if you implement - (void)webViewDidFinishLoad:(UIWebView *)webView in the webview's delegate object, you can determine whatever size you need the webview to be, and then resize the webview and parent views from there; make sure you also reset the contentSize of the scrollview as well.

If you want to resize your webview to fit all of its content though then you'll have a problem, since i don't believe that is possible.

Kevlar