Possible Duplicate:
How to determine the content size of a UIWebView?
Hai Guys,
I got a problem while lodaing the htmlString into UIWebView, I have set the frame height of a webview in iphone is 265 always.
webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 41, 320, 265)];
Is there any property to get content height of a UIWebView.
If I got the content only one or two lines then it is looking odd below the two lines. How can I make it dynamic. Please suggest any solution.
Thank you, Madan Mohan.
try this:
[webView stringByEvaluatingJavaScriptFromString:@"document.body.offsetHeight;"]
in your webViewDidFinishLoad
method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With