We hope this points you in the right direction.
stringByEvaluatingJavaScriptFromString: calling the stringByEvaluatingJavaScriptFromString: method on a UIWebView , you can execute JavaScript from your application into a UIWebView .
The above returns an NSString object with the width and height of any element that you pass to the getElementById function. With this information, you can resize the UIWebView to accommodate your content. Example:
CGRect frame = webView.frame; frame.size.width = 100; webView.frame = frame;
You may also need to reset scalesPageToFit again so that the content is reset to the new frame size.
Another option is to detect window.height and window.width on the HTML side and use JavaScript to customize the content in accordance with aspects of the UIWebView.
Intelekshual
source share