-(void) Webviewdidfinishload: (UIWebView *) webview{
[WebView stringbyevaluatingjavascriptfromstring:
@ "var script = document.createelement (' script ');"
"Script.type = ' text/javascript ';"
"Script.text = \" Function resizeimages () {"
"Var myimg,oldwidth;"
"Var maxwidth=305;"//Scaling factor
"For (I=0;i <document.images.length;i++) {"
"myimg = Document.images[i];"
"If (Myimg.width > MaxWidth) {"
"OldWidth = Myimg.width;"
"myimg.width = MaxWidth;"
"}"
"}"
"}\";"
"document.getElementsByTagName (' head ') [0].appendchild (script);"];
[WebView stringbyevaluatingjavascriptfromstring:@ "resizeimages ();"];
CGRect frame = webview.frame;
Frame.size.height = 1;
Webview.frame = frame;
Cgsize fittingsize = [WebView Sizethatfits:cgsizezero];
Frame.size = fittingsize;
Webview.frame = frame;
[Self updatescrollviews:frame];
}
Calculate the height and adaptive screen size of the WebView