Closed dineshprasanna closed 12 years ago
I found some answer , but I not try it
// get the width of your content [webview stringByEvaluatingJavaScriptFromString:@"document.getElementById('id_of_content_container').offsetWidth;"];
Did you set this webView.scalesPageToFit = YES; ???
Thanks Sir,I tried but it returns zero for scroll width, is there any other way to rectify it
now its working for me, thanks sir
The problem is that you call updatePagination in shouldRotate... this is incorrect, it has been called 2 times.
CHANGE THIS:
FOR THIS:
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES; }
i am trying to load an epub file in chapter wise into the webview. I want to know the width of the screen.
For Example:
if the content have one and half page text means it returns the width to be as 768 but if the content have two full page text means it returns the width to be as 1536
my code is:
int totalWidth = [[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.scrollWidth"] intValue];
please help me.....